mirror of
https://codeberg.org/secana/Forji.git
synced 2026-06-16 05:13:55 -07:00
fix: refresh the merged notifications list when a push notification is opened
Tapping a push notification bumps NavigationState's refresh trigger so the notifications tab reloads on arrival. The single-instance overview observes the trigger, but the merged multi-instance overview never did, so multi-instance users landed on a stale list that still showed the tapped thread as unread until a manual pull-to-refresh. Observe the same trigger in the merged overview, mirroring NotificationsOverviewView.
This commit is contained in:
parent
2a679140e6
commit
7ce43b09be
1 changed files with 4 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ struct MergedNotificationsOverviewView: View {
|
|||
|
||||
@State private var pagination: PaginationState<TaggedItem<NotificationThread>>
|
||||
@State private var statusFilter: String = "unread"
|
||||
@Environment(NavigationState.self) private var navigationState
|
||||
|
||||
init(manager: MultiInstanceManager) {
|
||||
self.manager = manager
|
||||
|
|
@ -95,6 +96,9 @@ struct MergedNotificationsOverviewView: View {
|
|||
.onChange(of: statusFilter) {
|
||||
reloadNotifications(clearItems: true)
|
||||
}
|
||||
.onChange(of: navigationState.notificationsRefreshTrigger) {
|
||||
reloadNotifications()
|
||||
}
|
||||
.errorAlert(message: $pagination.errorMessage, isPresented: $pagination.showError)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue