mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge pull request #2249 from stuartbreckenridge/feature/widget
Widget Work in Progress
This commit is contained in:
@@ -17,6 +17,7 @@ struct SceneNavigationView: View {
|
||||
|
||||
#if os(iOS)
|
||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||
@Environment(\.scenePhase) private var scenePhase
|
||||
#endif
|
||||
|
||||
var body: some View {
|
||||
@@ -64,6 +65,13 @@ struct SceneNavigationView: View {
|
||||
.onChange(of: sheetToShow) { value in
|
||||
value != .none ? (showSheet = true) : (showSheet = false)
|
||||
}
|
||||
.onChange(of: scenePhase) { newPhase in
|
||||
if newPhase == .background {
|
||||
#if os(iOS)
|
||||
WidgetDataEncoder.encodeWidgetData()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
.toolbar {
|
||||
|
||||
#if os(macOS)
|
||||
|
||||
Reference in New Issue
Block a user