Merge pull request #627 from mastodon/disable_double_tap_account_toggle

chore: Disable double-tap-to-switch-account
This commit is contained in:
Marcus Kida 2022-11-18 09:56:41 +01:00 committed by GitHub
commit 1928b1b8d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 11 deletions

View File

@ -326,11 +326,12 @@ extension MainTabBarController {
tabBarLongPressGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarLongPressGestureRecognizerHandler(_:))) tabBarLongPressGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarLongPressGestureRecognizerHandler(_:)))
tabBar.addGestureRecognizer(tabBarLongPressGestureRecognizer) tabBar.addGestureRecognizer(tabBarLongPressGestureRecognizer)
let tabBarDoubleTapGestureRecognizer = UITapGestureRecognizer() // todo: reconsider the "double tap to change account" feature -> https://github.com/mastodon/mastodon-ios/issues/628
tabBarDoubleTapGestureRecognizer.numberOfTapsRequired = 2 // let tabBarDoubleTapGestureRecognizer = UITapGestureRecognizer()
tabBarDoubleTapGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarDoubleTapGestureRecognizerHandler(_:))) // tabBarDoubleTapGestureRecognizer.numberOfTapsRequired = 2
tabBarDoubleTapGestureRecognizer.delaysTouchesEnded = false // tabBarDoubleTapGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarDoubleTapGestureRecognizerHandler(_:)))
tabBar.addGestureRecognizer(tabBarDoubleTapGestureRecognizer) // tabBarDoubleTapGestureRecognizer.delaysTouchesEnded = false
// tabBar.addGestureRecognizer(tabBarDoubleTapGestureRecognizer)
self.isReadyForWizardAvatarButton = authContext != nil self.isReadyForWizardAvatarButton = authContext != nil

View File

@ -145,12 +145,13 @@ extension SidebarViewController {
sidebarLongPressGestureRecognizer.addTarget(self, action: #selector(SidebarViewController.sidebarLongPressGestureRecognizerHandler(_:))) sidebarLongPressGestureRecognizer.addTarget(self, action: #selector(SidebarViewController.sidebarLongPressGestureRecognizerHandler(_:)))
collectionView.addGestureRecognizer(sidebarLongPressGestureRecognizer) collectionView.addGestureRecognizer(sidebarLongPressGestureRecognizer)
let sidebarDoubleTapGestureRecognizer = UITapGestureRecognizer() // todo: reconsider the "double tap to change account" feature -> https://github.com/mastodon/mastodon-ios/issues/628
sidebarDoubleTapGestureRecognizer.numberOfTapsRequired = 2 // let sidebarDoubleTapGestureRecognizer = UITapGestureRecognizer()
sidebarDoubleTapGestureRecognizer.addTarget(self, action: #selector(SidebarViewController.sidebarDoubleTapGestureRecognizerHandler(_:))) // sidebarDoubleTapGestureRecognizer.numberOfTapsRequired = 2
sidebarDoubleTapGestureRecognizer.delaysTouchesEnded = false // sidebarDoubleTapGestureRecognizer.addTarget(self, action: #selector(SidebarViewController.sidebarDoubleTapGestureRecognizerHandler(_:)))
sidebarDoubleTapGestureRecognizer.cancelsTouchesInView = true // sidebarDoubleTapGestureRecognizer.delaysTouchesEnded = false
collectionView.addGestureRecognizer(sidebarDoubleTapGestureRecognizer) // sidebarDoubleTapGestureRecognizer.cancelsTouchesInView = true
// collectionView.addGestureRecognizer(sidebarDoubleTapGestureRecognizer)
} }