Skip to content

Commit

Permalink
Fix: Init threshold settings on first load
Browse files Browse the repository at this point in the history
  • Loading branch information
bsc7 committed Nov 19, 2024
1 parent 00a2c25 commit e069f38
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class AppController {

async initApp() {
try {
this.#initSettings();
await this.#updateAddressesAndLoadAllReports();
this.#setInitialUIState();
await this.#loadAddressDetails();
Expand All @@ -62,6 +63,11 @@ export class AppController {
// PRIVATE METHODS
//////////////////////

#initSettings() {
const savedThresholds = this.storageService.getDeviationThresholds() || Constants.DEFAULT_DEVIATION_THRESHOLDS;
Constants.initialize({ DEVIATION_THRESHOLDS: savedThresholds });
}

#setInitialUIState() {
const hasAddresses = this.addressList && this.addressList.length > 0;
this.reportController.updateButtons();
Expand Down

0 comments on commit e069f38

Please sign in to comment.