Skip to content

Commit

Permalink
Reduced debug menu tap gesture to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkgang committed Dec 19, 2024
1 parent 7f150f5 commit 7bcd7ba
Showing 1 changed file with 7 additions and 7 deletions.
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 @@ 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 @@ -153,22 +153,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() {

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

0 comments on commit 7bcd7ba

Please sign in to comment.