Fixes crash on double click of space fabs

This commit is contained in:
ericdecanini 2022-09-12 12:26:57 -04:00
parent e37344a059
commit 8177d9777c
1 changed files with 4 additions and 5 deletions

View File

@ -201,13 +201,12 @@ class NewHomeDetailFragment :
private fun setupFabs() {
showFABs()
views.newLayoutCreateChatButton.setOnClickListener {
newChatBottomSheet.show(requireActivity().supportFragmentManager, NewChatBottomSheet.TAG)
views.newLayoutCreateChatButton.debouncedClicks {
newChatBottomSheet.takeIf { !it.isAdded }?.show(requireActivity().supportFragmentManager, NewChatBottomSheet.TAG)
}
views.newLayoutOpenSpacesButton.setOnClickListener {
// Click action for open spaces modal goes here
spaceListBottomSheet.show(requireActivity().supportFragmentManager, SpaceListBottomSheet.TAG)
views.newLayoutOpenSpacesButton.debouncedClicks {
spaceListBottomSheet.takeIf { !it.isAdded }?.show(requireActivity().supportFragmentManager, SpaceListBottomSheet.TAG)
}
}