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> {
|
excludeTypes: Set<MastodonNotification.NotificationType>) -> AnyPublisher<[CollectionSection], Error> {
|
||||||
ValueObservation.tracking(
|
ValueObservation.tracking(
|
||||||
NotificationInfo.request(
|
NotificationInfo.request(
|
||||||
NotificationRecord.order(NotificationRecord.Columns.id.desc)
|
NotificationRecord.order(NotificationRecord.Columns.createdAt.desc)
|
||||||
.filter(!excludeTypes.map(\.rawValue).contains(NotificationRecord.Columns.type))).fetchAll)
|
.filter(!excludeTypes.map(\.rawValue).contains(NotificationRecord.Columns.type))).fetchAll)
|
||||||
.removeDuplicates()
|
.removeDuplicates()
|
||||||
.publisher(in: databaseWriter)
|
.publisher(in: databaseWriter)
|
||||||
|
|
Loading…
Reference in New Issue