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

[PM-16213] feat: Reduce the required fingers to open the debug menu to 1 #966

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -50,7 +50,7 @@
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 @@ -153,22 +153,22 @@
}

#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() {

Check warning on line 158 in Bitwarden/Application/SceneDelegate.swift

View check run for this annotation

Codecov / codecov/patch

Bitwarden/Application/SceneDelegate.swift#L158

Added line #L158 was not covered by tests
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