Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced debug menu tap gesture to 1 #966

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Bitwarden/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
window = appWindow

#if DEBUG_MENU
addTripleTapGestureRecognizer(to: appWindow)
addTapGestureRecognizer(to: appWindow)
#endif

// Splash window. This is initially visible until the app's processor has finished starting.
Expand Down Expand Up @@ -137,22 +137,22 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}

#if DEBUG_MENU
/// Handle the triple-tap gesture and launch the debug menu.
/// Handle the tap gesture and launch the debug menu.
@objc
private func handleTripleTapGesture() {
private func handleTapGesture() {
appProcessor?.showDebugMenu()
}
#endif

#if DEBUG_MENU
/// Add the triple-tap gesture recognizer to the window.
private func addTripleTapGestureRecognizer(to window: UIWindow) {
/// Add the tap gesture recognizer to the window.
private func addTapGestureRecognizer(to window: UIWindow) {
let tapGesture = UITapGestureRecognizer(
target: self,
action: #selector(handleTripleTapGesture)
action: #selector(handleTapGesture)
)
tapGesture.numberOfTapsRequired = 3
tapGesture.numberOfTouchesRequired = 3
tapGesture.numberOfTouchesRequired = 1
window.addGestureRecognizer(tapGesture)
}
#endif
Expand Down
Loading