mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
refactor findUserByDisplayName
This commit is contained in:
@@ -1018,8 +1018,11 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
if (id) return id;
|
||||
if (noty.displayName) {
|
||||
return (
|
||||
findUserByDisplayName(userStore.cachedUsers, noty.displayName)
|
||||
?.id ?? ''
|
||||
findUserByDisplayName(
|
||||
userStore.cachedUsers,
|
||||
noty.displayName,
|
||||
userStore.cachedUserIdsByDisplayName
|
||||
)?.id ?? ''
|
||||
);
|
||||
}
|
||||
return '';
|
||||
@@ -1086,7 +1089,8 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
} else if (noty.displayName) {
|
||||
const ref = findUserByDisplayName(
|
||||
userStore.cachedUsers,
|
||||
noty.displayName
|
||||
noty.displayName,
|
||||
userStore.cachedUserIdsByDisplayName
|
||||
);
|
||||
if (ref) {
|
||||
noty.isFriend = friendStore.friends.has(ref.id);
|
||||
|
||||
Reference in New Issue
Block a user