Local world favorites 1

This commit is contained in:
Natsumi
2022-10-01 02:43:10 +13:00
parent b65b0c1b98
commit ee60fff3f5
2 changed files with 19 additions and 7 deletions

View File

@@ -21309,6 +21309,10 @@ speechSynthesis.getVoices();
this.worldDialog.isFavorite =
API.cachedFavoritesByObjectId.has(worldId);
}
// update UI
this.localWorldFavoriteGroups.sort();
this.localWorldFavorites.sort();
};
$app.methods.getLocalWorldFavorites = async function () {
@@ -21363,6 +21367,14 @@ speechSynthesis.getVoices();
return false;
};
$app.methods.getLocalWorldFavoriteGroupLength = function (group) {
var favoriteGroup = this.localWorldFavorites[group];
if (!favoriteGroup) {
return 0;
}
return favoriteGroup.length;
};
$app.methods.promptNewLocalWorldFavoriteGroup = function () {
this.$prompt('Enter a world favorite group name', 'New Group', {
distinguishCancelAndClose: true,