mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-06 01:46:35 +00: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:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user