mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 13:06:08 +02:00
Increase getCurrentUser cooldown to 7 minutes. (#881)
* Increase getCurrentUser cooldown to 7 minutes. * Fix nextCurrentUserRefresh interval.
This commit is contained in:
+4
-4
@@ -5749,7 +5749,7 @@ speechSynthesis.getVoices();
|
|||||||
if (API.isLoggedIn === true) {
|
if (API.isLoggedIn === true) {
|
||||||
if (--this.nextFriendsRefresh <= 0) {
|
if (--this.nextFriendsRefresh <= 0) {
|
||||||
this.nextFriendsRefresh = 7200; // 1hour
|
this.nextFriendsRefresh = 7200; // 1hour
|
||||||
this.nextCurrentUserRefresh = 60; // 30secs
|
this.nextCurrentUserRefresh = 840; // 7mins
|
||||||
this.refreshFriendsList();
|
this.refreshFriendsList();
|
||||||
this.updateStoredUser(API.currentUser);
|
this.updateStoredUser(API.currentUser);
|
||||||
if (this.isGameRunning) {
|
if (this.isGameRunning) {
|
||||||
@@ -5757,7 +5757,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (--this.nextCurrentUserRefresh <= 0) {
|
if (--this.nextCurrentUserRefresh <= 0) {
|
||||||
this.nextCurrentUserRefresh = 60; // 30secs
|
this.nextCurrentUserRefresh = 840; // 7mins
|
||||||
API.getCurrentUser().catch((err1) => {
|
API.getCurrentUser().catch((err1) => {
|
||||||
throw err1;
|
throw err1;
|
||||||
});
|
});
|
||||||
@@ -9073,11 +9073,11 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.refreshFriendsList = async function () {
|
$app.methods.refreshFriendsList = async function () {
|
||||||
await API.getCurrentUser();
|
await API.getCurrentUser();
|
||||||
this.nextCurrentUserRefresh = 60; // 30secs
|
this.nextCurrentUserRefresh = 840; // 7mins
|
||||||
await API.refreshFriends();
|
await API.refreshFriends();
|
||||||
API.closeWebSocket();
|
API.closeWebSocket();
|
||||||
await API.getCurrentUser();
|
await API.getCurrentUser();
|
||||||
this.nextCurrentUserRefresh = 60; // 30secs
|
this.nextCurrentUserRefresh = 840; // 7mins
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.refreshFriends = function (ref, origin) {
|
$app.methods.refreshFriends = function (ref, origin) {
|
||||||
|
|||||||
Reference in New Issue
Block a user