Skip to content

Commit

Permalink
Fix showing wrong region after launch
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingajda committed Apr 5, 2020
1 parent 69e47db commit d769f7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Covid-19 Status/src/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
statusBarItem?.menu = menu
display.setComponents(statusItem: button, deltaItem: deltaMenuItem)

let prefferedRegion = settings.string(forKey: "country")
regionsMenu.setCurrent(region: prefferedRegion ?? SpecialRegions.world.rawValue)

setAlertsEnabled(enabled: settings.bool(forKey: "alerts"))

regionsMenu.onRegionChange(callback: onRegionChange)
provider = DataProvider(onSuccess: onUpdateSuccess, onError: onUpdateFailure)

let prefferedRegion = settings.string(forKey: "country")
regionsMenu.setCurrent(region: prefferedRegion ?? SpecialRegions.world.rawValue)

provider?.doUpdate()
provider?.startTimer()
}
Expand Down

0 comments on commit d769f7f

Please sign in to comment.