2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

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
This commit is contained in:
shannon 2025-03-06 19:14:50 -05:00
parent 3c3facdf4d
commit 36fba12791

View File

@ -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(