Merge pull request #1172 from LukasKorba/1171-Hide-content-in-the-app-switcher

[#1171] Hide content in the app switcher
This commit is contained in:
Lukas Korba 2024-04-04 10:15:53 +02:00 committed by GitHub
commit ccb5b2936c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 1 deletions

View File

@ -13,6 +13,7 @@ directly impact users rather than highlighting other crucial architectural updat
### Added
- Tap to Copy memo.
- Content of Zashi is hidden in system's app switcher.
### Fixed
- Tap to Copy transaction ID button animation.

View File

@ -13,6 +13,9 @@ import ZcashLightClientKit
import UIComponents
public struct RootView: View {
@Environment(\.scenePhase) var scenePhase
@State var covered = false
let store: RootStore
let tokenName: String
let networkType: NetworkType
@ -24,7 +27,26 @@ public struct RootView: View {
}
public var body: some View {
switchOverDestination()
Group {
if covered {
VStack {
ZashiIcon()
.scaleEffect(2.0)
.padding(.bottom, 180)
}
.applyScreenBackground()
} else {
switchOverDestination()
}
}
.onChange(of: scenePhase) { value in
switch value {
case .active:
withAnimation { covered = false }
default:
withAnimation { covered = true }
}
}
}
}