mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Random fixes
This commit is contained in:
@@ -557,7 +557,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
);
|
);
|
||||||
const lastLocation$ = cachedCurrentUser?.$location;
|
const lastLocation$ = cachedCurrentUser?.$location;
|
||||||
const playersInInstance = locationStore.lastLocation.playerList;
|
const playersInInstance = locationStore.lastLocation.playerList;
|
||||||
if (lastLocation$.worldId === D.id && playersInInstance.size > 0) {
|
if (lastLocation$?.worldId === D.id && playersInInstance.size > 0) {
|
||||||
// pull instance json from cache
|
// pull instance json from cache
|
||||||
const friendsInInstance = locationStore.lastLocation.friendList;
|
const friendsInInstance = locationStore.lastLocation.friendList;
|
||||||
instance = {
|
instance = {
|
||||||
@@ -589,7 +589,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
typeof ref === 'undefined' ||
|
typeof ref === 'undefined' ||
|
||||||
typeof ref.$location === 'undefined' ||
|
typeof ref.$location === 'undefined' ||
|
||||||
ref.$location.worldId !== D.id ||
|
ref.$location.worldId !== D.id ||
|
||||||
(ref.$location.instanceId === lastLocation$.instanceId &&
|
(ref.$location.instanceId === lastLocation$?.instanceId &&
|
||||||
playersInInstance.size > 0 &&
|
playersInInstance.size > 0 &&
|
||||||
ref.location !== 'traveling')
|
ref.location !== 'traveling')
|
||||||
) {
|
) {
|
||||||
@@ -683,7 +683,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
// sort selected and current instance to top
|
// sort selected and current instance to top
|
||||||
if (
|
if (
|
||||||
b.location === D.$location.tag ||
|
b.location === D.$location.tag ||
|
||||||
b.location === lastLocation$.tag
|
b.location === lastLocation$?.tag
|
||||||
) {
|
) {
|
||||||
// sort selected instance above current instance
|
// sort selected instance above current instance
|
||||||
if (a.location === D.$location.tag) {
|
if (a.location === D.$location.tag) {
|
||||||
@@ -693,7 +693,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
a.location === D.$location.tag ||
|
a.location === D.$location.tag ||
|
||||||
a.location === lastLocation$.tag
|
a.location === lastLocation$?.tag
|
||||||
) {
|
) {
|
||||||
// sort selected instance above current instance
|
// sort selected instance above current instance
|
||||||
if (b.location === D.$location.tag) {
|
if (b.location === D.$location.tag) {
|
||||||
@@ -760,10 +760,10 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
const cachedCurrentUser = userStore.cachedUsers.get(
|
const cachedCurrentUser = userStore.cachedUsers.get(
|
||||||
userStore.currentUser.id
|
userStore.currentUser.id
|
||||||
);
|
);
|
||||||
const lastLocation$ = cachedCurrentUser.$location;
|
const lastLocation$ = cachedCurrentUser?.$location;
|
||||||
const currentLocation = lastLocation$.tag;
|
const currentLocation = lastLocation$?.tag;
|
||||||
const playersInInstance = locationStore.lastLocation.playerList;
|
const playersInInstance = locationStore.lastLocation.playerList;
|
||||||
if (lastLocation$.groupId === D.id && playersInInstance.size > 0) {
|
if (lastLocation$?.groupId === D.id && playersInInstance.size > 0) {
|
||||||
const friendsInInstance = locationStore.lastLocation.friendList;
|
const friendsInInstance = locationStore.lastLocation.friendList;
|
||||||
instance = {
|
instance = {
|
||||||
id: lastLocation$.instanceId,
|
id: lastLocation$.instanceId,
|
||||||
@@ -794,7 +794,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
typeof ref === 'undefined' ||
|
typeof ref === 'undefined' ||
|
||||||
typeof ref.$location === 'undefined' ||
|
typeof ref.$location === 'undefined' ||
|
||||||
ref.$location.groupId !== D.id ||
|
ref.$location.groupId !== D.id ||
|
||||||
(ref.$location.instanceId === lastLocation$.instanceId &&
|
(ref.$location.instanceId === lastLocation$?.instanceId &&
|
||||||
playersInInstance.size > 0 &&
|
playersInInstance.size > 0 &&
|
||||||
ref.location !== 'traveling')
|
ref.location !== 'traveling')
|
||||||
) {
|
) {
|
||||||
|
|||||||
+1
-1
@@ -758,7 +758,7 @@ export const useUserStore = defineStore('User', () => {
|
|||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
*/
|
*/
|
||||||
function showUserDialog(userId) {
|
function showUserDialog(userId) {
|
||||||
if (!userId) {
|
if (!userId || typeof userId !== 'string') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const D = userDialog.value;
|
const D = userDialog.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user