mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
Fix removing avatar from database when deleting favorite group
This commit is contained in:
@@ -29246,9 +29246,37 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
|
||||
avatarIdRemoveList.forEach((id) => {
|
||||
removeFromArray(this.localAvatarFavoritesList, id);
|
||||
if (!this.avatarHistory.has(id)) {
|
||||
database.removeAvatarFromCache(id);
|
||||
// remove from cache if no longer in favorites
|
||||
var avatarInFavorites = false;
|
||||
loop: for (
|
||||
var i = 0;
|
||||
i < this.localAvatarFavoriteGroups.length;
|
||||
++i
|
||||
) {
|
||||
var groupName = this.localAvatarFavoriteGroups[i];
|
||||
if (
|
||||
!this.localAvatarFavorites[groupName] ||
|
||||
group === groupName
|
||||
) {
|
||||
continue loop;
|
||||
}
|
||||
for (
|
||||
var j = 0;
|
||||
j < this.localAvatarFavorites[groupName].length;
|
||||
++j
|
||||
) {
|
||||
var avatarId = this.localAvatarFavorites[groupName][j].id;
|
||||
if (id === avatarId) {
|
||||
avatarInFavorites = true;
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!avatarInFavorites) {
|
||||
removeFromArray(this.localAvatarFavoritesList, id);
|
||||
if (!this.avatarHistory.has(id)) {
|
||||
database.removeAvatarFromCache(id);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user