Self hosted FLOSS fitness/workout, nutrition and weight tracker
Load weight entries on init
Roland Geider760a4af1a867
diff --git a/angular/src/app/weight/weight-chart/weight-chart.component.ts b/angular/src/app/weight/weight-chart/weight-chart.component.tsindex 9815d35f7..81259bc35 100644--- a/angular/src/app/weight/weight-chart/weight-chart.component.ts+++ b/angular/src/app/weight/weight-chart/weight-chart.component.ts@@ -40,8 +40,6 @@ export class WeightChartComponent implements OnInit, OnDestroy {) { }ngOnInit(): void {- // TODO: only load weight entries once- this.service.loadWeightEntries();this.subscription = this.service.weightChanged.subscribe((newEntries: WeightEntry[]) => {this.weightEntries = newEntries;diff --git a/angular/src/app/weight/weight-list/weight-list.component.ts b/angular/src/app/weight/weight-list/weight-list.component.tsindex 2e4aa0470..d97432c19 100644--- a/angular/src/app/weight/weight-list/weight-list.component.ts+++ b/angular/src/app/weight/weight-list/weight-list.component.ts@@ -36,7 +36,6 @@ export class WeightListComponent implements OnInit, OnDestroy {}ngOnInit(): void {- this.service.loadWeightEntries();this.subscription = this.service.weightChanged.subscribe((newEntries: WeightEntry[]) => {this.weightEntries = newEntries;diff --git a/angular/src/app/weight/weight.service.ts b/angular/src/app/weight/weight.service.tsindex 0c53a6f23..2a38840e1 100644--- a/angular/src/app/weight/weight.service.ts+++ b/angular/src/app/weight/weight.service.ts@@ -19,7 +19,7 @@ export class WeightService {private weightAdapter: WeightAdapter,private authService: AuthService,) {-+ this.loadWeightEntries();}get weightEntries() {