Fix document ordering in All Media gallery

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-06-17 17:31:24 -05:00
committed by GitHub
parent b61964a2ea
commit a9f07bcb60
+9 -8
View File
@@ -323,7 +323,6 @@ const {
omit,
partition,
pick,
sortBy,
} = lodash;
type ConversationRow = Readonly<{
@@ -5818,13 +5817,15 @@ function getSortedDocuments(
type: 'contacts',
}) as Array<ContactMediaItemDBType>;
return sortBy(
(documents as Array<MediaItemDBType | ContactMediaItemDBType>).concat(
contacts
),
[raw => raw.message.receivedAt, raw => raw.message.sentAt],
['DESC', 'DESC']
).slice(0, options.limit);
return lodash
.orderBy(
(documents as Array<MediaItemDBType | ContactMediaItemDBType>).concat(
contacts
),
[raw => raw.message.receivedAt, raw => raw.message.sentAt],
['desc', 'desc']
)
.slice(0, options.limit);
})();
}