mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-13 23:11:27 +03:00
Fixed bug where updater kept asking for updates on the update after it completed
This commit is contained in:
@@ -18,19 +18,17 @@ export class UpdateProgressDialogComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.getUpdateProgress();
|
this.getUpdateProgress();
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.getUpdateProgress();
|
if (this.updateStatus['updating']) { this.getUpdateProgress(); }
|
||||||
}, 250);
|
}, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
getUpdateProgress() {
|
getUpdateProgress() {
|
||||||
this.postsService.getUpdaterStatus().subscribe(res => {
|
this.postsService.getUpdaterStatus().subscribe(res => {
|
||||||
this.updateStatus = res;
|
if (res) {
|
||||||
if (!this.updateStatus) {
|
this.updateStatus = res;
|
||||||
// update complete?
|
if (this.updateStatus && this.updateStatus['error']) {
|
||||||
console.log('Update complete? or not started');
|
this.openSnackBar('Update failed. Check logs for more details.');
|
||||||
}
|
}
|
||||||
if (this.updateStatus && this.updateStatus['error']) {
|
|
||||||
this.openSnackBar('Update failed. Check logs for more details.');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user