[#1171] Hide content in the app switcher
- The Zashi hides its content when it's going to the background and reveals it when it's going to the foreground [#1171] Hide content in the app switcher (#1172) - changelog update
This commit is contained in:
parent
9decc16ffa
commit
e235a84528
|
@ -10,6 +10,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.
|
||||
|
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue