Instance names in VR wrist feed, replace emojis

This commit is contained in:
Natsumi
2025-09-29 09:30:00 +13:00
parent 8941bebad2
commit 560de42bd2
5 changed files with 123 additions and 50 deletions

View File

@@ -17,7 +17,8 @@ import {
getWorldName,
hasGroupPermission,
isRealInstance,
parseLocation
parseLocation,
replaceBioSymbols
} from '../shared/utils';
import { useFriendStore } from './friend';
import { useGroupStore } from './group';
@@ -390,6 +391,9 @@ export const useInstanceStore = defineStore('Instance', () => {
ref.$disabledContentSettings.push(setting);
}
}
if (ref.displayName) {
ref.displayName = replaceBioSymbols(ref.displayName);
}
if (
userStore.userDialog.visible &&
userStore.userDialog.ref.$location.tag === ref.id

View File

@@ -216,6 +216,26 @@ export const useSharedFeedStore = defineStore('SharedFeed', () => {
return 0;
});
wristFeed.splice(16);
// temp fix, tack on instance names in the worst way possible
for (let feedEntry of wristFeed) {
if (feedEntry.location) {
const instanceRef = instanceStore.cachedInstances.get(
feedEntry.location
);
if (instanceRef?.displayName) {
feedEntry.instanceDisplayName = instanceRef.displayName;
}
}
// invites
if (feedEntry.details?.worldId) {
const instanceRef = instanceStore.cachedInstances.get(
feedEntry.details.worldId
);
if (instanceRef?.displayName) {
feedEntry.instanceDisplayName = instanceRef.displayName;
}
}
}
AppApi.ExecuteVrFeedFunction(
'wristFeedUpdate',
JSON.stringify(wristFeed)