mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed: IllegalStateException
while setting the toolbar in SearchFragment
which i accidentally faced while navigating very frequently to other screens.
This commit is contained in:
parent
8df7bddff0
commit
9444a3d74b
@ -192,11 +192,12 @@ class SearchFragment : BaseFragment() {
|
||||
)
|
||||
}
|
||||
|
||||
@Suppress("UnnecessarySafeCall")
|
||||
private fun setupToolbar(view: View) {
|
||||
view.post {
|
||||
with(requireActivity() as CoreMainActivity) {
|
||||
setSupportActionBar(view.findViewById(R.id.toolbar))
|
||||
supportActionBar?.apply {
|
||||
with(activity as? CoreMainActivity) {
|
||||
this?.setSupportActionBar(view.findViewById(R.id.toolbar))
|
||||
this?.supportActionBar?.apply {
|
||||
setHomeButtonEnabled(true)
|
||||
title = getString(R.string.menu_search_in_text)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user