aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/settings
diff options
context:
space:
mode:
authorMax Friedrich <minacode@users.noreply.github.com>2023-04-30 17:03:46 +0200
committerGitHub <noreply@github.com>2023-04-30 17:03:46 +0200
commit020a7fd11d1b18fd7ac29ccc00b9c6f6e0cdb17b (patch)
treefd0a9aa11b201b573ce8826638b515fe61ffff23 /src/displayapp/screens/settings
parent5f19f689f9ebe1b00f3f7da22b20fb2700811375 (diff)
Refactor watch face to enum (#1339)
change watch face from int to enum --------- Co-authored-by: minacode <minamoto9@web.de>
Diffstat (limited to 'src/displayapp/screens/settings')
-rw-r--r--src/displayapp/screens/settings/SettingWatchFace.cpp7
1 files changed, 4 insertions, 3 deletions
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<Screen> SettingWatchFace::CreateScreen(unsigned int screenNum) c
nScreens,
title,
symbol,
- settingsController.GetClockFace(),
- [&settings = settingsController](uint32_t clockFace) {
- settings.SetClockFace(clockFace);
+ static_cast<uint32_t>(settingsController.GetWatchFace()),
+ [&settings = settingsController](uint32_t index) {
+ settings.SetWatchFace(static_cast<WatchFace>(index));
settings.SaveSettings();
},
watchfacesOnThisScreen);