mirror of
https://github.com/WowUp/WowUp.git
synced 2026-04-24 07:47:29 -04:00
Fix an issue not waitinfg for addon sync to finish.
This commit is contained in:
@@ -48,7 +48,7 @@ export class MyAddonsListItem {
|
||||
return AddonDisplayState.Install;
|
||||
}
|
||||
|
||||
if (this.addon.installedVersion != this.addon.latestVersion) {
|
||||
if (this.addon.installedVersion !== this.addon.latestVersion) {
|
||||
return AddonDisplayState.Update;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ export class MyAddonsListItem {
|
||||
}
|
||||
|
||||
public onClicked() {
|
||||
console.log(this.addon.name);
|
||||
this.selected = !this.selected;
|
||||
}
|
||||
|
||||
@@ -79,6 +78,7 @@ export class MyAddonsListItem {
|
||||
case AddonDisplayState.Install:
|
||||
case AddonDisplayState.Unknown:
|
||||
default:
|
||||
console.log('Unhandled display state', this.displayState)
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,6 +374,7 @@ export class MyAddonsComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
},
|
||||
error: (err) => {
|
||||
console.error(err);
|
||||
this.isBusy = false;
|
||||
this.enableControls = true;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export class AddonService {
|
||||
this.updateAddons(addons, newAddons);
|
||||
}
|
||||
|
||||
this.syncAddons(clientType, addons);
|
||||
await this.syncAddons(clientType, addons);
|
||||
|
||||
return addons;
|
||||
}
|
||||
|
||||
@@ -167,6 +167,10 @@ export class WarcraftService {
|
||||
|
||||
public async listAddons(clientType: WowClientType) {
|
||||
const addonFolders: AddonFolder[] = [];
|
||||
if (clientType === WowClientType.None) {
|
||||
return addonFolders;
|
||||
}
|
||||
|
||||
const addonFolderPath = this.getAddonFolderPath(clientType);
|
||||
|
||||
// Folder may not exist if no addons have been installed
|
||||
|
||||
Reference in New Issue
Block a user