mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 21:16:07 +02:00
Fix discord RPC bugs
This commit is contained in:
+14
-9
@@ -7962,7 +7962,11 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.updateDiscord = function () {
|
$app.methods.updateDiscord = function () {
|
||||||
if (!this.discordActive || !this.isGameRunning) {
|
if (
|
||||||
|
!this.discordActive ||
|
||||||
|
!this.isGameRunning ||
|
||||||
|
(!this.lastLocation.location && !this.lastLocation$.tag)
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var L = this.lastLocation$;
|
var L = this.lastLocation$;
|
||||||
@@ -7975,6 +7979,7 @@ speechSynthesis.getVoices();
|
|||||||
L.worldName = '';
|
L.worldName = '';
|
||||||
L.worldCapacity = 0;
|
L.worldCapacity = 0;
|
||||||
L.joinUrl = '';
|
L.joinUrl = '';
|
||||||
|
L.accessName = '';
|
||||||
if (L.worldId) {
|
if (L.worldId) {
|
||||||
var ref = API.cachedWorlds.get(L.worldId);
|
var ref = API.cachedWorlds.get(L.worldId);
|
||||||
if (ref) {
|
if (ref) {
|
||||||
@@ -7992,19 +7997,19 @@ speechSynthesis.getVoices();
|
|||||||
switch (L.accessType) {
|
switch (L.accessType) {
|
||||||
case 'public':
|
case 'public':
|
||||||
L.joinUrl = getLaunchURL(L.worldId, L.instanceId);
|
L.joinUrl = getLaunchURL(L.worldId, L.instanceId);
|
||||||
L.accessType = `Public #${L.instanceName}`;
|
L.accessName = `Public #${L.instanceName}`;
|
||||||
break;
|
break;
|
||||||
case 'invite+':
|
case 'invite+':
|
||||||
L.accessType = `Invite+ #${L.instanceName}`;
|
L.accessName = `Invite+ #${L.instanceName}`;
|
||||||
break;
|
break;
|
||||||
case 'invite':
|
case 'invite':
|
||||||
L.accessType = `Invite #${L.instanceName}`;
|
L.accessName = `Invite #${L.instanceName}`;
|
||||||
break;
|
break;
|
||||||
case 'friends':
|
case 'friends':
|
||||||
L.accessType = `Friends #${L.instanceName}`;
|
L.accessName = `Friends #${L.instanceName}`;
|
||||||
break;
|
break;
|
||||||
case 'friends+':
|
case 'friends+':
|
||||||
L.accessType = `Friends+ #${L.instanceName}`;
|
L.accessName = `Friends+ #${L.instanceName}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8012,8 +8017,8 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
var hidePrivate = false;
|
var hidePrivate = false;
|
||||||
if (
|
if (
|
||||||
(this.discordHideInvite && L.accessType === 'Invite') ||
|
this.discordHideInvite &&
|
||||||
L.accessType === 'Invite+'
|
(L.accessType === 'invite' || L.accessType === 'invite+')
|
||||||
) {
|
) {
|
||||||
hidePrivate = true;
|
hidePrivate = true;
|
||||||
}
|
}
|
||||||
@@ -8103,7 +8108,7 @@ speechSynthesis.getVoices();
|
|||||||
Discord.SetText('Private', '');
|
Discord.SetText('Private', '');
|
||||||
Discord.SetTimestamps(0, 0);
|
Discord.SetTimestamps(0, 0);
|
||||||
} else if (this.discordInstance) {
|
} else if (this.discordInstance) {
|
||||||
Discord.SetText(L.worldName, L.accessType);
|
Discord.SetText(L.worldName, L.accessName);
|
||||||
} else {
|
} else {
|
||||||
Discord.SetText(L.worldName, '');
|
Discord.SetText(L.worldName, '');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user