diff --git a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift index 5d015f8d..fa619884 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift @@ -6,6 +6,7 @@ import DesignSystem import Env public struct NotificationsListView: View { + @Environment(\.scenePhase) private var scenePhase @EnvironmentObject private var theme: Theme @EnvironmentObject private var watcher: StreamWatcher @EnvironmentObject private var client: Client @@ -59,6 +60,16 @@ public struct NotificationsListView: View { viewModel.handleEvent(event: latestEvent) } }) + .onChange(of: scenePhase, perform: { scenePhase in + switch scenePhase { + case .active: + Task { + await viewModel.fetchNotifications() + } + default: + break + } + }) } @ViewBuilder