fix weather display

This commit is contained in:
Lennart Jahn 2024-05-01 12:39:46 +02:00
parent a60b65abb6
commit 8138097e89

View file

@ -429,10 +429,11 @@ void WatchFaceStarTrek::Refresh() {
if (settingsController.GetStarTrekWeather()) {
currentWeather = weatherService.Current();
bool isUpdated = currentWeather.IsUpdated();
auto optCurrentWeather = currentWeather.Get();
if (optCurrentWeather) {
if (weatherNeedsRefresh || currentWeather.IsUpdated()) {
if (weatherNeedsRefresh || isUpdated) {
int16_t temp = optCurrentWeather->temperature;
if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) {
temp = Controllers::SimpleWeatherService::CelsiusToFahrenheit(temp);