mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-29 06:27:47 -04:00
1 parent
e4c4fe44ea
commit
df8b1d85ca
3 files changed
+128
-16
No files matched your search
@@ -119,9 +119,10 @@ Singleton {
|
||||
(entry.pinned ? pinned : unpinned).push(entry);
|
||||
}
|
||||
|
||||
const byIdDesc = (a, b) => b.id - a.id;
|
||||
pinned.sort(byIdDesc);
|
||||
unpinned.sort(byIdDesc);
|
||||
// JS Date keeps milliseconds only, so rows sharing one get id as the tie-break.
|
||||
const byTimestampDesc = (a, b) => (new Date(b.timestamp) - new Date(a.timestamp)) || (b.id - a.id);
|
||||
pinned.sort(byTimestampDesc);
|
||||
unpinned.sort(byTimestampDesc);
|
||||
|
||||
pinnedEntries = pinned;
|
||||
unpinnedEntries = unpinned;
|
||||
|
||||
Reference in new issue
Block a user