1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-22 06:19:03 +01:00

chore: Disable double-tap-to-switch-account

This commit is contained in:
Marcus Kida 2022-11-18 09:40:45 +01:00
parent 87d6fe9fc8
commit 3020f28ef4
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
2 changed files with 13 additions and 11 deletions

View File

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

View File

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