Remove unnecessary repetition of the same action. (#8840)

I have removed the unnecessary repetition of what ```gZenMarketplaceManager._triggerBuildUpdateWithoutRebuild``` already does and replaced those situations with calls to that actual function.

I have also rearranged that function to before the functions that call it so the flow makes more sense.

Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
This commit is contained in:
CosmoCreeper
2025-06-04 02:31:51 -04:00
committed by GitHub
parent 8f06bf21b0
commit ab9a752286

View File

@@ -131,6 +131,11 @@ var gZenMarketplaceManager = {
return this._modsList; return this._modsList;
}, },
_triggerBuildUpdateWithoutRebuild() {
this._doNotRebuildModsList = true;
gZenMods.triggerModsUpdate();
},
async removeMod(modId) { async removeMod(modId) {
await gZenMods.removeMod(modId); await gZenMods.removeMod(modId);
@@ -140,20 +145,13 @@ var gZenMarketplaceManager = {
async disableMod(modId) { async disableMod(modId) {
await gZenMods.disableMod(modId); await gZenMods.disableMod(modId);
this._doNotRebuildModsList = true; this._triggerBuildUpdateWithoutRebuild();
gZenMods.triggerModsUpdate();
}, },
async enableMod(modId) { async enableMod(modId) {
await gZenMods.enableMod(modId); await gZenMods.enableMod(modId);
this._doNotRebuildModsList = true; this._triggerBuildUpdateWithoutRebuild();
gZenMods.triggerModsUpdate();
},
_triggerBuildUpdateWithoutRebuild() {
this._doNotRebuildModsList = true;
gZenMods.triggerModsUpdate();
}, },
async _importThemes() { async _importThemes() {