IOS-110: Fix Cannot switch accounts when large content viewer is enabled (#976)
This commit is contained in:
parent
c1dab782b1
commit
73ce92216a
|
@ -26,6 +26,8 @@ class MainTabBarController: UITabBarController {
|
||||||
|
|
||||||
var authContext: AuthContext?
|
var authContext: AuthContext?
|
||||||
|
|
||||||
|
private let largeContentViewerInteraction = UILargeContentViewerInteraction()
|
||||||
|
|
||||||
let composeButttonShadowBackgroundContainer = ShadowBackgroundContainer()
|
let composeButttonShadowBackgroundContainer = ShadowBackgroundContainer()
|
||||||
let composeButton: UIButton = {
|
let composeButton: UIButton = {
|
||||||
let button = UIButton()
|
let button = UIButton()
|
||||||
|
@ -180,6 +182,8 @@ class MainTabBarController: UITabBarController {
|
||||||
self.coordinator = coordinator
|
self.coordinator = coordinator
|
||||||
self.authContext = authContext
|
self.authContext = authContext
|
||||||
super.init(nibName: nil, bundle: nil)
|
super.init(nibName: nil, bundle: nil)
|
||||||
|
tabBar.addInteraction(largeContentViewerInteraction)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
|
@ -349,6 +353,7 @@ extension MainTabBarController {
|
||||||
|
|
||||||
let tabBarLongPressGestureRecognizer = UILongPressGestureRecognizer()
|
let tabBarLongPressGestureRecognizer = UILongPressGestureRecognizer()
|
||||||
tabBarLongPressGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarLongPressGestureRecognizerHandler(_:)))
|
tabBarLongPressGestureRecognizer.addTarget(self, action: #selector(MainTabBarController.tabBarLongPressGestureRecognizerHandler(_:)))
|
||||||
|
tabBarLongPressGestureRecognizer.delegate = self
|
||||||
tabBar.addGestureRecognizer(tabBarLongPressGestureRecognizer)
|
tabBar.addGestureRecognizer(tabBarLongPressGestureRecognizer)
|
||||||
|
|
||||||
// todo: reconsider the "double tap to change account" feature -> https://github.com/mastodon/mastodon-ios/issues/628
|
// todo: reconsider the "double tap to change account" feature -> https://github.com/mastodon/mastodon-ios/issues/628
|
||||||
|
@ -844,3 +849,9 @@ extension MainTabBarController {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension MainTabBarController: UIGestureRecognizerDelegate {
|
||||||
|
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue