Skip to content

Commit

Permalink
WebHost: Sort tracker last activity 'None' as maximum instead of -1 (A…
Browse files Browse the repository at this point in the history
…rchipelagoMW#2446)

When managing an async, it can be useful to sort the tracker by Last
Activity to see who has potentially abandoned their slots. Today, if a
slot hasn't been started (last activity is None) then it is sorted as
if last activity is -1, that it is it has had more recent activity than
any other slot.

This change makes it so slots that haven't started are treated as if
they have last activity MAX_VALUE time ago. This way they get sorted
with slots that haven't been touched in a long time which should make
intuitive sense as the "last activity" is effectively inf time ago.
  • Loading branch information
remyjette authored and Jouramie committed Feb 28, 2024
1 parent ee3efd4 commit 90abca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WebHostLib/static/assets/trackerCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ window.addEventListener('load', () => {
render: function (data, type, row) {
if (type === "sort" || type === 'type') {
if (data === "None")
return -1;
return Number.MAX_VALUE;

return parseInt(data);
}
Expand Down

0 comments on commit 90abca8

Please sign in to comment.