mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Local world favorites 3
This commit is contained in:
@@ -21397,19 +21397,31 @@ speechSynthesis.getVoices();
|
|||||||
favoriteGroup.splice(i, 1);
|
favoriteGroup.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove from cache if no longer in favorites
|
||||||
var worldInFavorites = false;
|
var worldInFavorites = false;
|
||||||
for (var i = 0; i < this.localWorldFavoritesList.length; ++i) {
|
for (var i = 0; i < this.localWorldFavoriteGroups.length; ++i) {
|
||||||
for (var j = 0; j < this.localWorldFavoritesList[i].length; ++j) {
|
var groupName = this.localWorldFavoriteGroups[i];
|
||||||
if (this.localWorldFavoritesList[i][j] === worldId) {
|
if (!this.localWorldFavorites[groupName] || group === groupName) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (
|
||||||
|
var j = 0;
|
||||||
|
j < this.localWorldFavorites[groupName].length;
|
||||||
|
++j
|
||||||
|
) {
|
||||||
|
var id = this.localWorldFavorites[groupName][j].id;
|
||||||
|
if (id === worldId) {
|
||||||
worldInFavorites = true;
|
worldInFavorites = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
database.removeWorldFromFavorites(worldId, group);
|
|
||||||
if (!worldInFavorites) {
|
if (!worldInFavorites) {
|
||||||
removeFromArray(this.localWorldFavoritesList, worldId);
|
removeFromArray(this.localWorldFavoritesList, worldId);
|
||||||
database.removeWorldFromCache(worldId);
|
database.removeWorldFromCache(worldId);
|
||||||
}
|
}
|
||||||
|
database.removeWorldFromFavorites(worldId, group);
|
||||||
if (
|
if (
|
||||||
this.favoriteDialog.visible &&
|
this.favoriteDialog.visible &&
|
||||||
this.favoriteDialog.objectId === worldId
|
this.favoriteDialog.objectId === worldId
|
||||||
|
|||||||
Reference in New Issue
Block a user