Order notifications by createdAt instead of id
This commit is contained in:
parent
3e93ced674
commit
f251896198
|
@ -564,7 +564,7 @@ public extension ContentDatabase {
|
|||
excludeTypes: Set<MastodonNotification.NotificationType>) -> AnyPublisher<[CollectionSection], Error> {
|
||||
ValueObservation.tracking(
|
||||
NotificationInfo.request(
|
||||
NotificationRecord.order(NotificationRecord.Columns.id.desc)
|
||||
NotificationRecord.order(NotificationRecord.Columns.createdAt.desc)
|
||||
.filter(!excludeTypes.map(\.rawValue).contains(NotificationRecord.Columns.type))).fetchAll)
|
||||
.removeDuplicates()
|
||||
.publisher(in: databaseWriter)
|
||||
|
|
Loading…
Reference in New Issue