diff --git a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift index 65d2f3a9..6a1c75a4 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift @@ -98,6 +98,8 @@ public struct NotificationsListView: View { } .sheet(isPresented: $isNotificationsPolicyPresented) { NotificationsPolicyView() + .environment(client) + .environment(theme) } .navigationBarTitleDisplayMode(.inline) #if !os(visionOS) @@ -124,6 +126,7 @@ public struct NotificationsListView: View { SoundEffectManager.shared.playSound(.pull) HapticManager.shared.fireHaptic(.dataRefresh(intensity: 0.3)) await viewModel.fetchNotifications(viewModel.selectedType) + await viewModel.fetchPolicy() HapticManager.shared.fireHaptic(.dataRefresh(intensity: 0.7)) SoundEffectManager.shared.playSound(.refresh) } diff --git a/Packages/Notifications/Sources/Notifications/NotificationsViewModel.swift b/Packages/Notifications/Sources/Notifications/NotificationsViewModel.swift index 33eff9d7..ed129f63 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationsViewModel.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationsViewModel.swift @@ -182,7 +182,7 @@ import SwiftUI } func fetchPolicy() async { - policy = try? await client?.get(endpoint: Notifications.policy) + policy = try? await client?.get(endpoint: Notifications.policy, forceVersion: .v2) } func handleEvent(selectedType: Models.Notification.NotificationType?, event: any StreamEvent) {