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 {
|
views.allChatsLayout.setOnClickListener {
|
||||||
if (views.spaceModalFragment.isVisible) {
|
toggleModalVisibility()
|
||||||
views.spaceModalFragment.isVisible = false
|
}
|
||||||
views.dimView.isVisible = false
|
|
||||||
views.toolbarChevron.rotation = 0F
|
views.dimView.setOnClickListener {
|
||||||
} else {
|
toggleModalVisibility()
|
||||||
views.spaceModalFragment.isVisible = true
|
|
||||||
views.dimView.isVisible = true
|
|
||||||
views.toolbarChevron.rotation = 90F
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.onEach(HomeDetailViewState::showDialPadTab) { showDialPadTab ->
|
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() {
|
private fun handleCallStarted() {
|
||||||
dismissLoadingDialog()
|
dismissLoadingDialog()
|
||||||
val fragmentTag = HomeTab.DialPad.toFragmentTag()
|
val fragmentTag = HomeTab.DialPad.toFragmentTag()
|
||||||
|
|
Loading…
Reference in New Issue