From 36fba1279112942fb728075336300b93813f89fe Mon Sep 17 00:00:00 2001 From: shannon Date: Thu, 6 Mar 2025 19:14:50 -0500 Subject: [PATCH] If instance information is unavailable, assume grouped notifications are possible rather than assuming they are not Contributes to #399 [BUG] Multiple interactions do not collapse into a single notification --- .../GroupedNotificationFeedLoader.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Mastodon/In Progress New Layout and Datamodel/GroupedNotificationFeedLoader.swift b/Mastodon/In Progress New Layout and Datamodel/GroupedNotificationFeedLoader.swift index ed6c22484..53398f56e 100644 --- a/Mastodon/In Progress New Layout and Datamodel/GroupedNotificationFeedLoader.swift +++ b/Mastodon/In Progress New Layout and Datamodel/GroupedNotificationFeedLoader.swift @@ -81,7 +81,7 @@ final public class GroupedNotificationFeedLoader { if let currentInstance = AuthenticationServiceProvider.shared.currentActiveUser.value?.authentication.instanceConfiguration { useGrouped = currentInstance.canGroupNotifications } else { assertionFailure("no instance configuration") - useGrouped = false + useGrouped = true } case .notificationsWithAccount: useGrouped = false @@ -262,11 +262,13 @@ extension GroupedNotificationFeedLoader { olderThan maxID: String? = nil ) async throws -> NotificationsResultType { if useGroupedNotificationsApi { - return try await getGroupedNotifications( - withScope: scope, olderThan: maxID) - } else { - return try await getUngroupedNotifications(withScope: scope, olderThan: maxID) + do { + return try await getGroupedNotifications( + withScope: scope, olderThan: maxID) + } catch { + } } + return try await getUngroupedNotifications(withScope: scope, olderThan: maxID) } private func loadNotifications(