mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed test failure
This commit is contained in:
parent
f8594b0183
commit
eeaceabf0a
@ -46,19 +46,19 @@ abstract class BaseFragment : Fragment() {
|
||||
setupToolbar()
|
||||
}
|
||||
|
||||
// Setup toolbar to handle back pressed event
|
||||
// Setup toolbar to handle common back pressed event
|
||||
private fun setupToolbar() {
|
||||
val activity = activity as AppCompatActivity?
|
||||
fragmentToolbar?.apply {
|
||||
activity?.setSupportActionBar(this)
|
||||
setNavigationOnClickListener {
|
||||
activity?.apply {
|
||||
onBackPressedDispatcher.onBackPressed()
|
||||
supportActionBar?.let { actionBar ->
|
||||
activity?.let {
|
||||
it.setSupportActionBar(this)
|
||||
it.supportActionBar?.let { actionBar ->
|
||||
actionBar.setDisplayHomeAsUpEnabled(true)
|
||||
fragmentTitle?.let { title = it }
|
||||
title = fragmentTitle
|
||||
}
|
||||
}
|
||||
setNavigationOnClickListener {
|
||||
activity?.onBackPressedDispatcher?.onBackPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user