Skip to content

Commit

Permalink
[ABW-3739] Show the Privacy overlay only after the app enters the bac…
Browse files Browse the repository at this point in the history
…kground (#1284)
  • Loading branch information
danvleju-rdx authored Aug 26, 2024
1 parent 31eae3c commit 88b3179
Showing 1 changed file with 4 additions and 5 deletions.
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

0 comments on commit 88b3179

Please sign in to comment.