From e1c67cf345cf0b1093caa7c41c8e8981de8f24cb Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Wed, 1 Dec 2021 00:22:23 +0800 Subject: [PATCH] Save in new JSON format too --- apps/authentiwatch/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/authentiwatch/app.js b/apps/authentiwatch/app.js index c1316fe45..da8b6d220 100644 --- a/apps/authentiwatch/app.js +++ b/apps/authentiwatch/app.js @@ -258,7 +258,8 @@ function onSwipe(e) { } if (e == -1 && state.curtoken != -1 && tokens[state.curtoken].period <= 0) { tokens[state.curtoken].period--; - require("Storage").writeJSON("authentiwatch.json", tokens); + let save={data:tokens,count:tokens.length}; + require("Storage").writeJSON("authentiwatch.json", save); state.nextTime = 0; state.hide = 2; draw();