mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 09:41:02 +00:00
Fix notifications filter
This commit is contained in:
parent
e4d1196301
commit
7a35779b29
2 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue