mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Prevent fetching blocked users on game start
???
This commit is contained in:
+20
-5
@@ -3864,10 +3864,12 @@ speechSynthesis.getVoices();
|
|||||||
// #region | API: PlayerModeration
|
// #region | API: PlayerModeration
|
||||||
|
|
||||||
API.cachedPlayerModerations = new Map();
|
API.cachedPlayerModerations = new Map();
|
||||||
|
API.cachedPlayerModerationsUserIds = new Set();
|
||||||
API.isPlayerModerationsLoading = false;
|
API.isPlayerModerationsLoading = false;
|
||||||
|
|
||||||
API.$on('LOGIN', function () {
|
API.$on('LOGIN', function () {
|
||||||
this.cachedPlayerModerations.clear();
|
this.cachedPlayerModerations.clear();
|
||||||
|
this.cachedPlayerModerationsUserIds.clear();
|
||||||
this.isPlayerModerationsLoading = false;
|
this.isPlayerModerationsLoading = false;
|
||||||
this.refreshPlayerModerations();
|
this.refreshPlayerModerations();
|
||||||
});
|
});
|
||||||
@@ -3917,6 +3919,7 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.cachedPlayerModerationsUserIds.delete(moderated);
|
||||||
});
|
});
|
||||||
|
|
||||||
API.applyPlayerModeration = function (json) {
|
API.applyPlayerModeration = function (json) {
|
||||||
@@ -3941,10 +3944,14 @@ speechSynthesis.getVoices();
|
|||||||
Object.assign(ref, json);
|
Object.assign(ref, json);
|
||||||
ref.$isExpired = false;
|
ref.$isExpired = false;
|
||||||
}
|
}
|
||||||
|
if (json.targetUserId) {
|
||||||
|
this.cachedPlayerModerationsUserIds.add(json.targetUserId);
|
||||||
|
}
|
||||||
return ref;
|
return ref;
|
||||||
};
|
};
|
||||||
|
|
||||||
API.expirePlayerModerations = function () {
|
API.expirePlayerModerations = function () {
|
||||||
|
this.cachedPlayerModerationsUserIds.clear();
|
||||||
for (var ref of this.cachedPlayerModerations.values()) {
|
for (var ref of this.cachedPlayerModerations.values()) {
|
||||||
ref.$isExpired = true;
|
ref.$isExpired = true;
|
||||||
}
|
}
|
||||||
@@ -11162,12 +11169,20 @@ speechSynthesis.getVoices();
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
if (userId) {
|
if (!userId) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
this.gameLogApiLoggingEnabled = true;
|
this.gameLogApiLoggingEnabled = true;
|
||||||
if (!API.cachedUsers.has(userId)) {
|
if (
|
||||||
|
API.cachedUsers.has(userId) ||
|
||||||
|
API.cachedPlayerModerationsUserIds.has(userId)
|
||||||
|
) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (this.debugGameLog || this.debugWebRequests) {
|
||||||
|
console.log('Fetching user from gameLog:', userId);
|
||||||
|
}
|
||||||
API.getUser({ userId });
|
API.getUser({ userId });
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'avatar-change':
|
case 'avatar-change':
|
||||||
var ref = this.lastLocation.playerList.get(gameLog.displayName);
|
var ref = this.lastLocation.playerList.get(gameLog.displayName);
|
||||||
@@ -11328,7 +11343,7 @@ speechSynthesis.getVoices();
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.debugGameLog) {
|
if (this.debugGameLog) {
|
||||||
console.log('Fetching userId for', displayName);
|
console.log('Searching for userId for:', displayName);
|
||||||
}
|
}
|
||||||
var params = {
|
var params = {
|
||||||
n: 5,
|
n: 5,
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ mixin playerListTab()
|
|||||||
el-tag.x-tag-platform-ios(v-if="currentInstanceWorld.isIOS" type="info" effect="plain" size="mini" style="margin-right:5px") iOS
|
el-tag.x-tag-platform-ios(v-if="currentInstanceWorld.isIOS" type="info" effect="plain" size="mini" style="margin-right:5px") iOS
|
||||||
span.x-grey(v-if="currentInstanceWorld.bundleSizes['ios']" style="margin-left:5px;border-left:inherit;padding-left:5px") {{ currentInstanceWorld.bundleSizes['ios'].fileSize }}
|
span.x-grey(v-if="currentInstanceWorld.bundleSizes['ios']" style="margin-left:5px;border-left:inherit;padding-left:5px") {{ currentInstanceWorld.bundleSizes['ios'].fileSize }}
|
||||||
el-tag(v-if="currentInstanceWorld.avatarScalingDisabled" type="warning" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.world.tags.avatar_scaling_disabled') }}
|
el-tag(v-if="currentInstanceWorld.avatarScalingDisabled" type="warning" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.world.tags.avatar_scaling_disabled') }}
|
||||||
el-tag(type="info" effect="plain" size="mini" v-text="currentInstanceWorld.fileSize" style="margin-right:5px")
|
|
||||||
el-tag(v-if="currentInstanceWorld.inCache" type="info" effect="plain" size="mini" style="margin-right:5px")
|
el-tag(v-if="currentInstanceWorld.inCache" type="info" effect="plain" size="mini" style="margin-right:5px")
|
||||||
span(v-text="currentInstanceWorld.cacheSize")
|
span(v-text="currentInstanceWorld.cacheSize")
|
||||||
| {{ $t('dialog.world.tags.cache') }}
|
| {{ $t('dialog.world.tags.cache') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user