Fix select avatar

This commit is contained in:
Natsumi
2025-07-16 07:31:38 +12:00
parent 4b7ebfc1eb
commit 0ab0378678
6 changed files with 25 additions and 34 deletions
+7 -7
View File
@@ -610,16 +610,15 @@ export const useAvatarStore = defineStore('Avatar', () => {
});
return;
}
avatarRequest
return avatarRequest
.selectAvatar({
avatarId: id
})
.then((args) => {
new Noty({
type: 'success',
text: 'Avatar changed via launch command'
}).show();
return args;
.then(() => {
$app.$message({
message: 'Avatar changed',
type: 'success'
});
});
}
@@ -722,6 +721,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
getAvatarName,
lookupAvatars,
selectAvatarWithConfirmation,
selectAvatarWithoutConfirmation,
showAvatarAuthorDialog,
addAvatarWearTime
};
+4 -1
View File
@@ -1943,7 +1943,7 @@ export const useUserStore = defineStore('User', () => {
last_platform: json.last_platform,
// location - missing from currentUser
// note - missing from currentUser
platform: json.presence.platform,
// platform - not always present
profilePicOverride: json.profilePicOverride,
profilePicOverrideThumbnail: json.profilePicOverrideThumbnail,
pronouns: json.pronouns,
@@ -1976,6 +1976,9 @@ export const useUserStore = defineStore('User', () => {
userRef.$offline_for = state.currentUser.$offline_for;
userRef.$location_at = state.currentUser.$location_at;
userRef.$travelingToTime = state.currentUser.$travelingToTime;
if (json.presence?.platform) {
userRef.platform = json.presence.platform;
}
return ref;
}
+9 -1
View File
@@ -30,6 +30,7 @@ import { useUpdateLoopStore } from './updateLoop';
import { useUserStore } from './user';
import { useWorldStore } from './world';
import { useI18n } from 'vue-i18n-bridge';
import Noty from 'noty';
export const useVrcxStore = defineStore('Vrcx', () => {
const gameStore = useGameStore();
@@ -617,7 +618,14 @@ export const useVrcxStore = defineStore('Vrcx', () => {
// Makes sure the window is focused
shouldFocusWindow = true;
} else {
$app.selectAvatarWithoutConfirmation(avatarId);
avatarStore
.selectAvatarWithoutConfirmation(avatarId)
.then(() => {
new Noty({
type: 'success',
text: 'Avatar changed via launch command'
}).show();
});
shouldFocusWindow = false;
}
break;