Sort the ancestors and descendants

pull/904/head
Lim Chee Aun 2024-10-28 18:47:47 +08:00
rodzic 8f3077b06b
commit dd3b064aec
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -321,6 +321,10 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
const context = await contextFetch;
const { ancestors, descendants } = context;
// Sort oldest first
ancestors.sort((a, b) => a.createdAt - b.createdAt);
descendants.sort((a, b) => a.createdAt - b.createdAt);
totalDescendants.current = descendants?.length || 0;
const missingStatuses = new Set();