mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
hotfix: stations sorting by 'no limit'
This commit is contained in:
@@ -216,16 +216,20 @@ export const useMainStore = defineStore('mainStore', {
|
||||
return acc;
|
||||
}, [] as ActiveScenery[]);
|
||||
|
||||
|
||||
const referenceTimestamp = Date.now();
|
||||
|
||||
const onlineActiveSceneries = apiStore.activeData?.activeSceneries.reduce((list, scenery) => {
|
||||
if (scenery.isOnline !== 1 && Date.now() - scenery.lastSeen > 1000 * 60 * 2) return list;
|
||||
if (scenery.dispatcherStatus == Status.ActiveDispatcher.UNKNOWN) return list;
|
||||
|
||||
const dispatcherTimestamp =
|
||||
scenery.dispatcherStatus == Status.ActiveDispatcher.NO_LIMIT
|
||||
? Date.now() + 25500000
|
||||
? referenceTimestamp + 25500000
|
||||
: scenery.dispatcherStatus > 5
|
||||
? scenery.dispatcherStatus
|
||||
: null;
|
||||
|
||||
|
||||
list.push({
|
||||
name: scenery.stationName,
|
||||
|
||||
Reference in New Issue
Block a user