fix avatarinfo cannot refresh

This commit is contained in:
pa
2026-02-12 11:39:03 +09:00
parent 689549ecab
commit 77f1795697
2 changed files with 6 additions and 5 deletions
@@ -151,6 +151,7 @@
</span> </span>
<div class="extra"> <div class="extra">
<AvatarInfo <AvatarInfo
:key="userDialog.id"
:imageurl="userDialog.ref.currentAvatarImageUrl" :imageurl="userDialog.ref.currentAvatarImageUrl"
:userid="userDialog.id" :userid="userDialog.id"
:avatartags="userDialog.ref.currentAvatarTags" :avatartags="userDialog.ref.currentAvatarTags"
+5 -5
View File
@@ -484,7 +484,7 @@ export const useUserStore = defineStore('User', () => {
delete json.currentAvatarThumbnailImageUrl; delete json.currentAvatarThumbnailImageUrl;
} }
if (typeof ref === 'undefined') { if (typeof ref === 'undefined') {
ref = { ref = reactive({
ageVerificationStatus: '', ageVerificationStatus: '',
ageVerified: false, ageVerified: false,
allowAvatarCopying: false, allowAvatarCopying: false,
@@ -553,7 +553,7 @@ export const useUserStore = defineStore('User', () => {
$moderations: {}, $moderations: {},
// //
...json ...json
}; });
if (locationStore.lastLocation.playerList.has(json.id)) { if (locationStore.lastLocation.playerList.has(json.id)) {
// update $location_at from instance join time // update $location_at from instance join time
const player = locationStore.lastLocation.playerList.get( const player = locationStore.lastLocation.playerList.get(
@@ -644,12 +644,12 @@ export const useUserStore = defineStore('User', () => {
if (ref.location === 'traveling') { if (ref.location === 'traveling') {
ref.$location = parseLocation(ref.travelingToLocation); ref.$location = parseLocation(ref.travelingToLocation);
if (!currentTravelers.has(ref.id) && ref.travelingToLocation) { if (!currentTravelers.has(ref.id) && ref.travelingToLocation) {
const travelRef = ref({ const travelRef = reactive({
created_at: new Date().toJSON(), created_at: new Date().toJSON(),
...ref ...ref
}); });
currentTravelers.set(ref.id, travelRef.value); currentTravelers.set(ref.id, travelRef);
onPlayerTraveling(travelRef.value); onPlayerTraveling(travelRef);
} }
} else { } else {
ref.$location = parseLocation(ref.location); ref.$location = parseLocation(ref.location);