Implements hide modal on click dim view
This commit is contained in:
parent
051adad0ed
commit
4ee5b90f82
|
@ -144,15 +144,11 @@ class HomeDetailFragment @Inject constructor(
|
|||
}
|
||||
|
||||
views.allChatsLayout.setOnClickListener {
|
||||
if (views.spaceModalFragment.isVisible) {
|
||||
views.spaceModalFragment.isVisible = false
|
||||
views.dimView.isVisible = false
|
||||
views.toolbarChevron.rotation = 0F
|
||||
} else {
|
||||
views.spaceModalFragment.isVisible = true
|
||||
views.dimView.isVisible = true
|
||||
views.toolbarChevron.rotation = 90F
|
||||
toggleModalVisibility()
|
||||
}
|
||||
|
||||
views.dimView.setOnClickListener {
|
||||
toggleModalVisibility()
|
||||
}
|
||||
|
||||
viewModel.onEach(HomeDetailViewState::showDialPadTab) { showDialPadTab ->
|
||||
|
@ -202,6 +198,18 @@ class HomeDetailFragment @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun toggleModalVisibility() {
|
||||
if (views.spaceModalFragment.isVisible) {
|
||||
views.spaceModalFragment.isVisible = false
|
||||
views.dimView.isVisible = false
|
||||
views.toolbarChevron.rotation = 0F
|
||||
} else {
|
||||
views.spaceModalFragment.isVisible = true
|
||||
views.dimView.isVisible = true
|
||||
views.toolbarChevron.rotation = 90F
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleCallStarted() {
|
||||
dismissLoadingDialog()
|
||||
val fragmentTag = HomeTab.DialPad.toFragmentTag()
|
||||
|
|
Loading…
Reference in New Issue