From ee70e612934fa2c328815f6b9a609533d20f82c5 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Mon, 22 Sep 2025 05:08:42 +1200 Subject: [PATCH] Update dialogs when user travel ends --- src/stores/user.js | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/stores/user.js b/src/stores/user.js index e774593d..1cf2f9be 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -1273,22 +1273,28 @@ export const useUserStore = defineStore('User', () => { } newCount++; state.instancePlayerCount.set(newLocation, newCount); - } - if (props.location && ref.id === state.userDialog.id) { - // update user dialog instance occupants - applyUserDialogLocation(true); - } - if ( - props.location && - ref.$location.worldId === worldStore.worldDialog.id - ) { - instanceStore.applyWorldDialogInstances(); - } - if ( - props.location && - ref.$location.groupId === groupStore.groupDialog.id - ) { - instanceStore.applyGroupDialogInstances(); + + const previousLocationL = parseLocation(previousLocation); + const newLocationL = parseLocation(newLocation); + if ( + previousLocationL.tag === state.userDialog.$location.tag || + newLocationL.tag === state.userDialog.$location.tag + ) { + // update user dialog instance occupants + applyUserDialogLocation(true); + } + if ( + previousLocationL.worldId === worldStore.worldDialog.id || + newLocationL.worldId === worldStore.worldDialog.id + ) { + instanceStore.applyWorldDialogInstances(); + } + if ( + previousLocationL.groupId === groupStore.groupDialog.id || + newLocationL.groupId === groupStore.groupDialog.id + ) { + instanceStore.applyGroupDialogInstances(); + } } if ( !props.state &&