notifications are now always ordered from newest to oldest activity

This commit is contained in:
Martin Filser 2023-11-07 19:07:34 +01:00
parent c4882707e9
commit 00e60ff855

View file

@ -856,9 +856,9 @@ Users.helpers({
notification.activityObj = ReactiveMiniMongoIndex.getActivityWithId(notification.activity); notification.activityObj = ReactiveMiniMongoIndex.getActivityWithId(notification.activity);
} }
} }
// this sorts them newest to oldest to match Trello's behavior // newest first. don't use reverse() because it changes the array inplace, so sometimes the array is reversed twice and oldest items at top again
notifications.reverse(); const ret = notifications.toReversed();
return notifications; return ret;
}, },
hasShowDesktopDragHandles() { hasShowDesktopDragHandles() {