Commit 51402e68 authored by Viktor De Pasquale's avatar Viktor De Pasquale Committed by John Wu

Fixed log not displaying back button when alternative view is shown

parent 1b881322
......@@ -137,7 +137,7 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
viewModel.insets.value = insets
}
private fun setDisplayHomeAsUpEnabled(isEnabled: Boolean) {
fun setDisplayHomeAsUpEnabled(isEnabled: Boolean) {
binding.mainToolbar.startAnimations()
when {
isEnabled -> binding.mainToolbar.setNavigationIcon(R.drawable.ic_back_md2)
......
......@@ -24,7 +24,10 @@ class LogFragment : BaseUIFragment<LogViewModel, FragmentLogMd2Binding>() {
set(value) {
MotionRevealHelper.withViews(binding.logFilter, binding.logFilterToggle, value)
actionSave?.isVisible = !value
(activity as MainActivity).invalidateToolbar()
with(activity as MainActivity) {
invalidateToolbar()
setDisplayHomeAsUpEnabled(value)
}
}
override fun onStart() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment