From 306a754e73f2ee321eab8c076fff57af74d61400 Mon Sep 17 00:00:00 2001 From: pypy Date: Sat, 11 Jan 2020 23:44:42 +0900 Subject: [PATCH] bugfix --- html/app.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/html/app.js b/html/app.js index dd0c8d3e..fc6d2392 100644 --- a/html/app.js +++ b/html/app.js @@ -1605,8 +1605,7 @@ if (window.CefSharp) { }); API.markAllNotificationsAsExpired = function () { - for (var key in this.notification) { - var ctx = this.cachedNotifications.get(key); + for (var ctx of this.cachedNotifications.values()) { if (!ctx.$isExpired) { ctx.$isExpired = true; } @@ -1614,8 +1613,7 @@ if (window.CefSharp) { }; API.checkExpiredNotifcations = function () { - for (var key in this.notification) { - var ctx = this.cachedNotifications.get(key); + for (var ctx of this.cachedNotifications.values()) { if (ctx.$isExpired && !ctx.$isExpired) { ctx.$isExpired = true; @@ -1784,12 +1782,11 @@ if (window.CefSharp) { }; API.getFriendRequest = function (userId) { - for (var key in this.notification) { - var ctx = this.cachedNotifications.get(key); + for (var ctx of this.cachedNotifications.values()) { if (ctx.type === 'friendRequest' && ctx.senderUserId === userId && !ctx.$isExpired) { - return key; + return ctx.id; } } return '';