Properly fixed analysis day refreshing

This commit is contained in:
2024-11-08 13:54:47 +01:00
parent 51cf5e7202
commit c364c6faf9
3 changed files with 3 additions and 17 deletions

View File

@@ -49,26 +49,12 @@ export class AnalysisPage {
@ViewChild('chart') chartRef: ElementRef;
private chart: any;
private changeListener: any;
constructor(private time: TimeService) {
addIcons({briefcase, pizza, card})
}
ionViewDidEnter() {
this.updateCurrentData();
let lastDate: any = undefined;
this.changeListener = setInterval(() => {
if (this.currentDate != lastDate) {
lastDate = this.currentDate;
this.updateCurrentData();
}
}, 200)
}
ionViewDidLeave() {
clearInterval(this.changeListener);
}
public updateCurrentData() {