mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Fix removing avatar from database when deleting favorite group
This commit is contained in:
+31
-3
@@ -29246,9 +29246,37 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
|
|
||||||
avatarIdRemoveList.forEach((id) => {
|
avatarIdRemoveList.forEach((id) => {
|
||||||
removeFromArray(this.localAvatarFavoritesList, id);
|
// remove from cache if no longer in favorites
|
||||||
if (!this.avatarHistory.has(id)) {
|
var avatarInFavorites = false;
|
||||||
database.removeAvatarFromCache(id);
|
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