diff --git a/InfiniLink/BLE/BLEUpdateHandler.swift b/InfiniLink/BLE/BLEUpdateHandler.swift index 26058d3..90a9745 100644 --- a/InfiniLink/BLE/BLEUpdateHandler.swift +++ b/InfiniLink/BLE/BLEUpdateHandler.swift @@ -36,9 +36,7 @@ struct BLEUpdatedCharacteristicHandler { } func handleUpdates(characteristic: CBCharacteristic, peripheral: CBPeripheral) { - if NetworkManager.shared.getNetworkState() { - weatherController.updateWeatherData(ignoreTimeLimits: false) - } + weatherController.updateWeatherData(ignoreTimeLimits: false) switch characteristic.uuid { case bleManagerVal.cbuuidList.musicControl: diff --git a/InfiniLink/Core/Weather/WeatherController.swift b/InfiniLink/Core/Weather/WeatherController.swift index 9e2cc9d..b6a9a82 100644 --- a/InfiniLink/Core/Weather/WeatherController.swift +++ b/InfiniLink/Core/Weather/WeatherController.swift @@ -11,7 +11,7 @@ import SwiftyJSON import SwiftUI class WeatherController: NSObject, ObservableObject, CLLocationManagerDelegate { - @AppStorage("weatherData") var weatherData: Bool = false + @AppStorage("weatherData") var weatherData: Bool = true @AppStorage("useCurrentLocation") var useCurrentLocation: Bool = false @AppStorage("setLocation") var setLocation : String = "Cupertino" @AppStorage("lastLocation") var lastLocation : String = "Cupertino" @@ -521,7 +521,7 @@ class WeatherController: NSObject, ObservableObject, CLLocationManagerDelegate { } func updateWeatherData(ignoreTimeLimits: Bool) { - if !weatherData {return} + if !weatherData, !NetworkManager.shared.getNetworkState() { return } var canUpdateNWS = true var canUpdateWAPI = true