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

[ABW-3739] Show the Privacy overlay only after the app enters the background #1284

Merged
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
9 changes: 4 additions & 5 deletions RadixWallet/Features/AppFeature/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ public final class SceneDelegate: NSObject, UIWindowSceneDelegate, ObservableObj
appsFlyerClient.continue(userActivity)
}

public func sceneWillResignActive(_ scene: UIScene) {
public func sceneDidEnterBackground(_ scene: UIScene) {
guard let scene = scene as? UIWindowScene else { return }
showPrivacyProtectionWindow(in: scene)
}

public func sceneDidBecomeActive(_ scene: UIScene) {
guard let scene = scene as? UIWindowScene else { return }
hidePrivacyProtectionWindow(in: scene)
public func sceneWillEnterForeground(_ scene: UIScene) {
hidePrivacyProtectionWindow()
}

func overlayWindow(in scene: UIWindowScene) {
Expand Down Expand Up @@ -70,7 +69,7 @@ public final class SceneDelegate: NSObject, UIWindowSceneDelegate, ObservableObj
privacyProtectionWindow?.makeKeyAndVisible()
}

private func hidePrivacyProtectionWindow(in scene: UIWindowScene) {
private func hidePrivacyProtectionWindow() {
privacyProtectionWindow?.isHidden = true
privacyProtectionWindow = nil
}
Expand Down
Loading