diff --git a/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift b/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift index 55630544..de95da97 100644 --- a/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift +++ b/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift @@ -263,6 +263,9 @@ class NotificationsCollectionViewController: UIViewController, TimelineLikeColle return } var snapshot = dataSource.snapshot() + guard snapshot.sectionIdentifiers.contains(.notifications) else { + return + } let items = snapshot.itemIdentifiers(inSection: .notifications) let toDelete = statusIDs.flatMap { id in items.lazy.filter { $0.group?.notifications.first?.status?.id == id }