mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Sort the ancestors and descendants
This commit is contained in:
parent
8f3077b06b
commit
dd3b064aec
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue