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-signalandtrevor-signal authored and GitHub committed 2026-06-17 15:31:24 -07:00
1 parent b61964a2ea
commit a9f07bcb60
1 file changed
+9 -8
+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);
})();
}