Skip to content

Commit

Permalink
Merge pull request #7102 from vector-im/feature/eric/double-space-cli…
Browse files Browse the repository at this point in the history
…ck-fix

Fixes Crash On Double Click Of Space FABs
  • Loading branch information
bmarty authored Sep 14, 2022
2 parents 147dac8 + 34303c4 commit 8dbfafb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/7102.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes crash when quickly double clicking FABs in the new app layout
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import im.vector.app.features.navigation.Navigator
import javax.inject.Inject

@AndroidEntryPoint
class NewChatBottomSheet @Inject constructor() : BottomSheetDialogFragment() {
class NewChatBottomSheet : BottomSheetDialogFragment() {

@Inject lateinit var navigator: Navigator

Expand Down

0 comments on commit 8dbfafb

Please sign in to comment.