1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 10:39:59 +02:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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