mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Improve ordering of getRecentStoryReplies
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
@@ -3764,13 +3764,13 @@ function getRecentStoryReplies(
|
||||
(
|
||||
${timeFilter}
|
||||
)
|
||||
ORDER BY received_at DESC, sent_at DESC
|
||||
`;
|
||||
|
||||
const template = sqlFragment`
|
||||
SELECT first.* FROM (${createQuery(timeFilters.first)}) as first
|
||||
UNION ALL
|
||||
SELECT second.* FROM (${createQuery(timeFilters.second)}) as second
|
||||
ORDER BY received_at DESC, sent_at DESC
|
||||
`;
|
||||
|
||||
const [query, params] = sql`${template} LIMIT ${limit}`;
|
||||
|
||||
Reference in New Issue
Block a user