Added back button for ModuleFragment when displaying filter

This commit is contained in:
Viktor De Pasquale 2020-03-24 15:53:34 +01:00 committed by John Wu
parent 51402e68d2
commit bb9c362bab

View File

@ -33,8 +33,11 @@ class ModuleFragment : BaseUIFragment<ModuleViewModel, FragmentModuleMd2Binding>
get() = binding.moduleFilter.isVisible get() = binding.moduleFilter.isVisible
set(value) { set(value) {
if (!value) hideKeyboard() if (!value) hideKeyboard()
(activity as? MainActivity)?.requestNavigationHidden(value)
MotionRevealHelper.withViews(binding.moduleFilter, binding.moduleFilterToggle, value) MotionRevealHelper.withViews(binding.moduleFilter, binding.moduleFilterToggle, value)
with(activity as MainActivity) {
requestNavigationHidden(value)
setDisplayHomeAsUpEnabled(value)
}
} }
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {