mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Lower amount of user requests on state changes
remove pending offline option
This commit is contained in:
@@ -5098,7 +5098,8 @@ speechSynthesis.getVoices();
|
||||
json: {
|
||||
location: content.location,
|
||||
travelingToLocation: content.travelingToLocation,
|
||||
...content.user
|
||||
...content.user,
|
||||
state: 'online'
|
||||
},
|
||||
params: {
|
||||
userId: content.userId
|
||||
@@ -5118,7 +5119,10 @@ speechSynthesis.getVoices();
|
||||
case 'friend-active':
|
||||
if (content?.user?.id) {
|
||||
this.$emit('USER', {
|
||||
json: content.user,
|
||||
json: {
|
||||
...content.user,
|
||||
state: 'active'
|
||||
},
|
||||
params: {
|
||||
userId: content.userId
|
||||
}
|
||||
@@ -5175,7 +5179,8 @@ speechSynthesis.getVoices();
|
||||
json: {
|
||||
location: content.location,
|
||||
travelingToLocation: content.travelingToLocation,
|
||||
...content.user
|
||||
...content.user,
|
||||
state: 'online'
|
||||
},
|
||||
params: {
|
||||
userId: content.userId
|
||||
@@ -9464,7 +9469,7 @@ speechSynthesis.getVoices();
|
||||
this.sortOfflineFriends = true;
|
||||
}
|
||||
}
|
||||
// FIXME: 도배 가능성 있음
|
||||
// from getCurrentUser only, fetch user if offline in an instance
|
||||
if (
|
||||
origin &&
|
||||
ctx.state !== 'online' &&
|
||||
@@ -9544,21 +9549,11 @@ speechSynthesis.getVoices();
|
||||
) {
|
||||
if (this.debugFriendState) {
|
||||
console.log(
|
||||
ctx.name,
|
||||
new Date().toJSON(),
|
||||
'falsePositiveOffline',
|
||||
stateInput,
|
||||
ctx.ref.state
|
||||
`falsePositiveOffline ${ctx.name} currentState:${ctx.ref.state} expectedState:${stateInput}`
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
var isVIP = this.localFavoriteFriends.has(id);
|
||||
var newState = stateInput;
|
||||
var args = await API.getUser({
|
||||
userId: id
|
||||
});
|
||||
newState = args.ref.state;
|
||||
if (this.debugFriendState) {
|
||||
console.log(
|
||||
ctx.name,
|
||||
@@ -9568,7 +9563,9 @@ speechSynthesis.getVoices();
|
||||
ctx.ref.state
|
||||
);
|
||||
}
|
||||
var newRef = args.ref;
|
||||
var isVIP = this.localFavoriteFriends.has(id);
|
||||
var newState = stateInput;
|
||||
var ref = ctx.ref;
|
||||
if (ctx.state !== newState && typeof ctx.ref !== 'undefined') {
|
||||
if (
|
||||
(newState === 'offline' || newState === 'active') &&
|
||||
@@ -9587,8 +9584,8 @@ speechSynthesis.getVoices();
|
||||
var feed = {
|
||||
created_at: new Date().toJSON(),
|
||||
type: 'Offline',
|
||||
userId: newRef.id,
|
||||
displayName: newRef.displayName,
|
||||
userId: ref.id,
|
||||
displayName: ref.displayName,
|
||||
location,
|
||||
worldName,
|
||||
groupName,
|
||||
@@ -9606,14 +9603,14 @@ speechSynthesis.getVoices();
|
||||
ctx.ref.$online_for = Date.now();
|
||||
ctx.ref.$offline_for = '';
|
||||
ctx.ref.$active_for = '';
|
||||
var worldName = await this.getWorldName(newRef.location);
|
||||
var worldName = await this.getWorldName(ref.location);
|
||||
var groupName = await this.getGroupName(location);
|
||||
var feed = {
|
||||
created_at: new Date().toJSON(),
|
||||
type: 'Online',
|
||||
userId: id,
|
||||
displayName: ctx.name,
|
||||
location: newRef.location,
|
||||
location: ref.location,
|
||||
worldName,
|
||||
groupName,
|
||||
time: ''
|
||||
@@ -9655,7 +9652,7 @@ speechSynthesis.getVoices();
|
||||
this.updateOnlineFriendCoutner();
|
||||
}
|
||||
ctx.state = newState;
|
||||
ctx.name = newRef.displayName;
|
||||
ctx.name = ref.displayName;
|
||||
ctx.isVIP = isVIP;
|
||||
};
|
||||
|
||||
@@ -10590,9 +10587,6 @@ speechSynthesis.getVoices();
|
||||
ref.$previousLocation = '';
|
||||
ref.$travelingToTime = Date.now();
|
||||
}
|
||||
if (friend.state !== 'online') {
|
||||
API.getUser({ userId: ref.id });
|
||||
}
|
||||
}
|
||||
if (
|
||||
props.location &&
|
||||
@@ -15738,10 +15732,7 @@ speechSynthesis.getVoices();
|
||||
'[ "https://avtr.just-h.party/vrcx_search.php" ]'
|
||||
)
|
||||
);
|
||||
$app.data.pendingOfflineDelay = await configRepository.getInt(
|
||||
'VRCX_pendingOfflineDelay',
|
||||
110000
|
||||
);
|
||||
$app.data.pendingOfflineDelay = 110000;
|
||||
if (await configRepository.getString('VRCX_avatarRemoteDatabaseProvider')) {
|
||||
// move existing provider to new list
|
||||
var avatarRemoteDatabaseProvider = await configRepository.getString(
|
||||
@@ -29309,41 +29300,6 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
};
|
||||
|
||||
// #endregion
|
||||
// #region | App: pending offline timer
|
||||
|
||||
$app.methods.promptSetPendingOffline = function () {
|
||||
this.$prompt(
|
||||
$t('prompt.pending_offline_delay.description'),
|
||||
$t('prompt.pending_offline_delay.header'),
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: $t('prompt.pending_offline_delay.save'),
|
||||
cancelButtonText: $t('prompt.pending_offline_delay.cancel'),
|
||||
inputValue: this.pendingOfflineDelay / 1000,
|
||||
inputPattern: /\d+$/,
|
||||
inputErrorMessage: $t(
|
||||
'prompt.pending_offline_delay.input_error'
|
||||
),
|
||||
callback: async (action, instance) => {
|
||||
if (
|
||||
action === 'confirm' &&
|
||||
instance.inputValue &&
|
||||
!isNaN(instance.inputValue)
|
||||
) {
|
||||
this.pendingOfflineDelay = Math.trunc(
|
||||
Number(instance.inputValue) * 1000
|
||||
);
|
||||
await configRepository.setInt(
|
||||
'VRCX_pendingOfflineDelay',
|
||||
this.pendingOfflineDelay
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
// #endregion
|
||||
// #region | App: ChatBox Blacklist
|
||||
$app.data.chatboxBlacklist = [
|
||||
|
||||
@@ -405,11 +405,6 @@
|
||||
"screenshot_metadata": "Screenshot Metadata",
|
||||
"vrc_registry_backup": "VRC Registry Backup",
|
||||
"common_folders": "Common Folders",
|
||||
"pending_offline": {
|
||||
"header": "Pending Offline",
|
||||
"description": "Delay before marking user as offline (fixes false positives)",
|
||||
"set_delay": "Set Delay"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Primary Password",
|
||||
"description": "Encrypt password (disables auto login)"
|
||||
|
||||
@@ -405,11 +405,6 @@
|
||||
"screenshot_metadata": "Metadatos de las Capturas de Pantalla",
|
||||
"vrc_registry_backup": "Copia de seguridad del registro de VRC",
|
||||
"common_folders": "Carpetas Comunes",
|
||||
"pending_offline": {
|
||||
"header": "Pendiente de Desconexión",
|
||||
"description": "Retraso antes de marcar al usuario como desconectado (corrige los falsos positivos)",
|
||||
"set_delay": "Establecer retraso"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Contraseña Principal",
|
||||
"description": "Cifrar contraseña (deshabilita el inicio de sesión automático)"
|
||||
@@ -1743,4 +1738,4 @@
|
||||
"online": "En línea:"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "Métadonnées d'une capture d'écran",
|
||||
"vrc_registry_backup": "Sauvegarde du registre VRC",
|
||||
"common_folders": "Dossiers communs",
|
||||
"pending_offline": {
|
||||
"header": "En attendant l'hors ligne",
|
||||
"description": "Délai avant de marquer un utilisateur comme étant hors ligne (corrige les faux positifs)",
|
||||
"set_delay": "Réglage du délai"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Mot de passe principal",
|
||||
"description": "Encodage du mot de passe (désactive la connexion automatique)"
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "Screenshot Metadata",
|
||||
"vrc_registry_backup": "VRC Registry Backup",
|
||||
"common_folders": "Common Folders",
|
||||
"pending_offline": {
|
||||
"header": "Pending Offline",
|
||||
"description": "Delay before marking user as offline (fixes false positives)",
|
||||
"set_delay": "Set Delay"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Primary Password",
|
||||
"description": "Encrypt password (disables auto login)"
|
||||
|
||||
@@ -405,11 +405,6 @@
|
||||
"screenshot_metadata": "スクリーンショットのメタデータ",
|
||||
"vrc_registry_backup": "VRChatのレジストリをバックアップ",
|
||||
"common_folders": "共通フォルダ",
|
||||
"pending_offline": {
|
||||
"header": "オフラインの保留",
|
||||
"description": "オフラインと判定されるまでの時間 (誤検知対策)",
|
||||
"set_delay": "遅延時間を設定"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "プライマリーパスワード",
|
||||
"description": "パスワードを暗号化 (自動ログイン無効化)"
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "스크린샷 메타데이터",
|
||||
"vrc_registry_backup": "VRC Registry Backup",
|
||||
"common_folders": "Common Folders",
|
||||
"pending_offline": {
|
||||
"header": "오프라인 대기",
|
||||
"description": "유저의 오프라인 상태 전환을 유예합니다. (버그 해결)",
|
||||
"set_delay": "대기 시간 설정"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "잠금 비밀번호",
|
||||
"description": "비밀번호 암호화 사용 (자동 로그인 불가)"
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "Metadane zrzutu ekranu",
|
||||
"vrc_registry_backup": "Kopia zapasowa rejestru VRC",
|
||||
"common_folders": "Foldery",
|
||||
"pending_offline": {
|
||||
"header": "Oczekujące offline",
|
||||
"description": "Odczekaj przed oznaczeniem użytkownika jako offline (unika fałszywych alarmów)",
|
||||
"set_delay": "Ustaw opóźnienie"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Hasło główne",
|
||||
"description": "Szyfruj hasło (wyłącza automatyczne logowanie)"
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "Screenshot Metadata",
|
||||
"vrc_registry_backup": "Backup do Registro VRC",
|
||||
"common_folders": "Pastas Comuns",
|
||||
"pending_offline": {
|
||||
"header": "Pendências Offline",
|
||||
"description": "Atraso antes de marcar o usuário como offline (corrige falsos positivos)",
|
||||
"set_delay": "Definir Atraso"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Senha Primaria",
|
||||
"description": "Criptografar senha (desativa o login automático)"
|
||||
|
||||
@@ -405,11 +405,6 @@
|
||||
"screenshot_metadata": "Метаданные скриншота",
|
||||
"vrc_registry_backup": "Резервное копирование реестра VRC",
|
||||
"common_folders": "Общие папки",
|
||||
"pending_offline": {
|
||||
"header": "Ожидание отключения",
|
||||
"description": "Задержка перед отметкой пользователя как офлайн (исправляет ложные срабатывания)",
|
||||
"set_delay": "Установить задержку"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Основной пароль",
|
||||
"description": "Шифровать пароль (отключает автоматический вход)"
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "Screenshot Metadata",
|
||||
"vrc_registry_backup": "VRC Registry Backup",
|
||||
"common_folders": "Thư mục chung",
|
||||
"pending_offline": {
|
||||
"header": "Đang chờ Offline",
|
||||
"description": "Trì trệ trước khi đánh dấu người chơi đang offline (sửa lỗi hiển thị sai)",
|
||||
"set_delay": "Đặt trì trệ"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "Mật khẩu chính",
|
||||
"description": "Mã hóa mật khẩu (sẽ tắt đăng nhập tự động)"
|
||||
|
||||
@@ -405,11 +405,6 @@
|
||||
"screenshot_metadata": "截图元数据查看器",
|
||||
"vrc_registry_backup": "VRC 设置数据备份工具",
|
||||
"common_folders": "常用文件夹",
|
||||
"pending_offline": {
|
||||
"header": "离线标记延迟",
|
||||
"description": "将好友标记为离线之前的延迟(防止误判)",
|
||||
"set_delay": "设置延迟"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "独立密码",
|
||||
"description": "使用独立密码加密 VRCX 数据(将停用自动登录)"
|
||||
|
||||
@@ -413,11 +413,6 @@
|
||||
"screenshot_metadata": "螢幕截圖詳細資訊",
|
||||
"vrc_registry_backup": "VRC Registry Backup",
|
||||
"common_folders": "遊戲資料夾",
|
||||
"pending_offline": {
|
||||
"header": "待確認離線",
|
||||
"description": "將玩家標記為離線之前延遲(防止誤判)",
|
||||
"set_delay": "設定延遲"
|
||||
},
|
||||
"primary_password": {
|
||||
"header": "主密碼",
|
||||
"description": "密碼加密(將停用自動登入)"
|
||||
|
||||
@@ -563,11 +563,6 @@ mixin settingsTab()
|
||||
div.options-container
|
||||
span.header {{ $t('view.settings.advanced.advanced.cache_debug.header') }}
|
||||
br
|
||||
span.sub-header {{ $t('view.settings.advanced.advanced.pending_offline.header') }}
|
||||
div.options-container-item
|
||||
span.name {{ $t('view.settings.advanced.advanced.pending_offline.description') }}
|
||||
el-button-group(style="display:block")
|
||||
el-button(size="small" icon="el-icon-s-operation" @click="promptSetPendingOffline") {{ $t('view.settings.advanced.advanced.pending_offline.set_delay') }}
|
||||
+simpleSwitch("view.settings.advanced.advanced.cache_debug.udon_exception_logging", "udonExceptionLogging", "saveOpenVROption")
|
||||
div.options-container-item
|
||||
span.name {{ $t('view.settings.advanced.advanced.cache_debug.disable_gamelog') }}
|
||||
|
||||
Reference in New Issue
Block a user