mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 06:16:05 +02:00
import performance
This commit is contained in:
@@ -134,6 +134,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
}
|
||||
favoriteStore.applyFavorite('avatar', ref.id);
|
||||
if (favoriteStore.localAvatarFavoritesList.includes(ref.id)) {
|
||||
const avatarRef = ref;
|
||||
for (
|
||||
let i = 0;
|
||||
i < favoriteStore.localAvatarFavoriteGroups.length;
|
||||
@@ -148,16 +149,17 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
j < favoriteStore.localAvatarFavorites[groupName].length;
|
||||
++j
|
||||
) {
|
||||
const ref =
|
||||
const favoriteRef =
|
||||
favoriteStore.localAvatarFavorites[groupName][j];
|
||||
if (ref.id === ref.id) {
|
||||
favoriteStore.localAvatarFavorites[groupName][j] = ref;
|
||||
if (favoriteRef.id === avatarRef.id) {
|
||||
favoriteStore.localAvatarFavorites[groupName][j] =
|
||||
avatarRef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update db cache
|
||||
database.addAvatarToCache(ref);
|
||||
database.addAvatarToCache(avatarRef);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user