From dd1404893620c260d3fe331aa2dc375908383028 Mon Sep 17 00:00:00 2001 From: Usman Shafiq Date: Tue, 27 Aug 2024 21:53:50 -0400 Subject: [PATCH] Increase getCurrentUser cooldown to 7 minutes. (#881) * Increase getCurrentUser cooldown to 7 minutes. * Fix nextCurrentUserRefresh interval. --- html/src/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 9c9f7692..d8cd8368 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -5749,7 +5749,7 @@ speechSynthesis.getVoices(); if (API.isLoggedIn === true) { if (--this.nextFriendsRefresh <= 0) { this.nextFriendsRefresh = 7200; // 1hour - this.nextCurrentUserRefresh = 60; // 30secs + this.nextCurrentUserRefresh = 840; // 7mins this.refreshFriendsList(); this.updateStoredUser(API.currentUser); if (this.isGameRunning) { @@ -5757,7 +5757,7 @@ speechSynthesis.getVoices(); } } if (--this.nextCurrentUserRefresh <= 0) { - this.nextCurrentUserRefresh = 60; // 30secs + this.nextCurrentUserRefresh = 840; // 7mins API.getCurrentUser().catch((err1) => { throw err1; }); @@ -9073,11 +9073,11 @@ speechSynthesis.getVoices(); $app.methods.refreshFriendsList = async function () { await API.getCurrentUser(); - this.nextCurrentUserRefresh = 60; // 30secs + this.nextCurrentUserRefresh = 840; // 7mins await API.refreshFriends(); API.closeWebSocket(); await API.getCurrentUser(); - this.nextCurrentUserRefresh = 60; // 30secs + this.nextCurrentUserRefresh = 840; // 7mins }; $app.methods.refreshFriends = function (ref, origin) {