diff options
| author | Victor Kareh <vkareh@redhat.com> | 2026-01-05 07:12:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-05 13:12:08 +0100 |
| commit | f88c69a31aadb0fdfe6555db626ba8f05e756272 (patch) | |
| tree | f173289f96c89a38afc5198a6b61e192cf372118 /src/displayapp/screens/WeatherSymbols.cpp | |
| parent | 51a6fb6a7ed7a410bb141966a43a7649d10bbdfc (diff) | |
SimpleWeatherService: Add sunrise and sunset data (#2100)
* SimpleWeatherService: Add sunrise and sunset data
---------
Co-authored-by: mark9064 <30447455+mark9064@users.noreply.github.com>
Diffstat (limited to 'src/displayapp/screens/WeatherSymbols.cpp')
| -rw-r--r-- | src/displayapp/screens/WeatherSymbols.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/displayapp/screens/WeatherSymbols.cpp b/src/displayapp/screens/WeatherSymbols.cpp index 0a963bc6..762180c7 100644 --- a/src/displayapp/screens/WeatherSymbols.cpp +++ b/src/displayapp/screens/WeatherSymbols.cpp @@ -1,11 +1,18 @@ #include "displayapp/screens/WeatherSymbols.h" -const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon) { +const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon, + const bool isNight) { switch (icon) { case Pinetime::Controllers::SimpleWeatherService::Icons::Sun: + if (isNight) { + return Symbols::moon; + } return Symbols::sun; break; case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun: + if (isNight) { + return Symbols::cloudMoon; + } return Symbols::cloudSun; break; case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds: @@ -24,6 +31,9 @@ const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime:: return Symbols::cloudShowersHeavy; break; case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain: + if (isNight) { + return Symbols::cloudMoonRain; + } return Symbols::cloudSunRain; break; case Pinetime::Controllers::SimpleWeatherService::Icons::Smog: |
