From 3cfecec5adb93cc3651b8e4f496fc26669124cbd Mon Sep 17 00:00:00 2001 From: Natsumi Date: Tue, 15 Dec 2020 13:54:43 +1300 Subject: [PATCH] Fix online/offline timer --- html/src/app.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 6de6c2e2..9aea8ea5 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -4073,18 +4073,17 @@ import gameLogService from './service/gamelog.js' if ((ctx.ref.$offline_for == '') && ((ctx.state == 'offline') && ctx.ref.state == '') || (((ctx.state == 'offline') || (ctx.state == 'active')) && - ((ctx.ref.state != 'offline') && (ctx.ref.state != 'active') && (ctx.ref.state != '')))) { + ((ctx.ref.state == 'online')))) { ctx.ref.$online_for = ''; ctx.ref.$offline_for = Date.now(); } - if ((ctx.ref.$online_for == '') && (ctx.state == 'online')) { + if (ctx.state == 'online') { ctx.ref.$location_at = Date.now(); ctx.ref.$online_for = Date.now(); ctx.ref.$offline_for = ''; } } } - }; // ascending