From 020a7fd11d1b18fd7ac29ccc00b9c6f6e0cdb17b Mon Sep 17 00:00:00 2001 From: Max Friedrich Date: Sun, 30 Apr 2023 17:03:46 +0200 Subject: Refactor watch face to enum (#1339) change watch face from int to enum --------- Co-authored-by: minacode --- src/displayapp/screens/settings/SettingWatchFace.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/displayapp/screens/settings') diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp index 285efa72..5498d067 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.cpp +++ b/src/displayapp/screens/settings/SettingWatchFace.cpp @@ -3,6 +3,7 @@ #include "displayapp/DisplayApp.h" #include "displayapp/screens/Screen.h" #include "components/settings/Settings.h" +#include "displayapp/WatchFaces.h" using namespace Pinetime::Applications::Screens; @@ -47,9 +48,9 @@ std::unique_ptr SettingWatchFace::CreateScreen(unsigned int screenNum) c nScreens, title, symbol, - settingsController.GetClockFace(), - [&settings = settingsController](uint32_t clockFace) { - settings.SetClockFace(clockFace); + static_cast(settingsController.GetWatchFace()), + [&settings = settingsController](uint32_t index) { + settings.SetWatchFace(static_cast(index)); settings.SaveSettings(); }, watchfacesOnThisScreen); -- cgit v1.2.3-70-g09d2