Refactor watch face to enum (#1339)
change watch face from int to enum --------- Co-authored-by: minacode <minamoto9@web.de>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user