From 3ed137f0b7100d362327cbc4debd5853a8478098 Mon Sep 17 00:00:00 2001 From: pypy Date: Wed, 26 May 2021 12:27:14 +0900 Subject: [PATCH] fix notification spam --- html/src/app.js | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 9fd39fb8..ff8a6edc 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -2113,20 +2113,25 @@ speechSynthesis.getVoices(); } this.isNotificationsLoading = true; this.expireNotifications(); - this.bulk({ - fn: 'getNotifications', - N: -1, - params: { - n: 50, - offset: 0 - }, - done(ok) { - if (ok) { - this.deleteExpiredNotifcations(); - } - this.isNotificationsLoading = false; - } + this.expireNotifications(); + this.getNotifications({ n: 100 }).then(() => { + this.deleteExpiredNotifcations(); + this.isNotificationsLoading = false; }); + // this.bulk({ + // fn: 'getNotifications', + // N: -1, + // params: { + // n: 50, + // offset: 0 + // }, + // done(ok) { + // if (ok) { + // this.deleteExpiredNotifcations(); + // } + // this.isNotificationsLoading = false; + // } + // }); }; /*