mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-18 12:05:34 +00:00
Fix a crash in notification stream
This commit is contained in:
parent
84d111999e
commit
46cc7a6849
1 changed files with 2 additions and 1 deletions
|
@ -118,7 +118,8 @@ class NotificationsViewModel: ObservableObject {
|
||||||
!consolidatedNotifications.flatMap(\.notificationIds).contains(event.notification.id),
|
!consolidatedNotifications.flatMap(\.notificationIds).contains(event.notification.id),
|
||||||
selectedType == nil || selectedType?.rawValue == event.notification.type
|
selectedType == nil || selectedType?.rawValue == event.notification.type
|
||||||
{
|
{
|
||||||
if event.notification.isConsolidable(selectedType: selectedType) {
|
if event.notification.isConsolidable(selectedType: selectedType),
|
||||||
|
!consolidatedNotifications.isEmpty {
|
||||||
// If the notification type can be consolidated, try to consolidate with the latest row
|
// If the notification type can be consolidated, try to consolidate with the latest row
|
||||||
let latestConsolidatedNotification = consolidatedNotifications.removeFirst()
|
let latestConsolidatedNotification = consolidatedNotifications.removeFirst()
|
||||||
consolidatedNotifications.insert(
|
consolidatedNotifications.insert(
|
||||||
|
|
Loading…
Reference in a new issue