From 22f6d4a40b6715b436f5eb3bf8524fa955eccd20 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 24 Dec 2023 11:44:37 +0100 Subject: Watch face selection using CMake The list of watch face to build into the firmware is now set by CMake (-DENABLE_WATCHFACES). Fix SettingWatchFace : convert to index to/from WatchFace when needed. --- src/displayapp/DisplayApp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/displayapp/DisplayApp.cpp') diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 2792009f..938d1179 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -489,10 +489,11 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio currentScreen = std::make_unique(this, settingsController); break; case Apps::SettingWatchFace: { - std::array items; + std::array items; int i = 0; for (const auto& userWatchFace : userWatchFaces) { - items[i++] = Screens::CheckboxList::Item {userWatchFace.name, userWatchFace.isAvailable(controllers.filesystem)}; + items[i++] = + Screens::SettingWatchFace::Item {userWatchFace.name, userWatchFace.watchFace, userWatchFace.isAvailable(controllers.filesystem)}; } currentScreen = std::make_unique(this, std::move(items), settingsController, filesystem); } break; -- cgit v1.2.3-70-g09d2