InfiniTime.git

commit 2400110900fbc69007f892295e734d083739bd0d

Author: Jean-François Milants <jf@codingfield.com>

CheckBoxList : remove unused constant MAXLISTITEMS (replaced by MaxItems).

 src/displayapp/screens/CheckboxList.cpp | 4 ++--
 src/displayapp/screens/CheckboxList.h | 3 +--


diff --git a/src/displayapp/screens/CheckboxList.cpp b/src/displayapp/screens/CheckboxList.cpp
index d351a852a5f164012766d6ddd792f29de512c7ed..7c7e8565cf463aaad186373413e8f1e13c352a6a 100644
--- a/src/displayapp/screens/CheckboxList.cpp
+++ b/src/displayapp/screens/CheckboxList.cpp
@@ -89,7 +89,7 @@       cbOption[i]->user_data = this;
       lv_obj_set_event_cb(cbOption[i], event_handler);
       SetRadioButtonStyle(cbOption[i]);
 
-      if (static_cast<unsigned int>((settingsController.*GetOptionIndex)() - MAXLISTITEMS * screenID) == i) {
+      if (static_cast<unsigned int>((settingsController.*GetOptionIndex)() - MaxItems * screenID) == i) {
         lv_checkbox_set_checked(cbOption[i], true);
       }
     }
@@ -107,7 +107,7 @@     for (unsigned int i = 0; i < options.size(); i++) {
       if (strcmp(options[i], "")) {
         if (object == cbOption[i]) {
           lv_checkbox_set_checked(cbOption[i], true);
-          (settingsController.*SetOptionIndex)(MAXLISTITEMS * screenID + i);
+          (settingsController.*SetOptionIndex)(MaxItems* screenID + i);
         } else {
           lv_checkbox_set_checked(cbOption[i], false);
         }




diff --git a/src/displayapp/screens/CheckboxList.h b/src/displayapp/screens/CheckboxList.h
index 68280edd06efc889cac0927f0a070f5564747337..5bdd143e3d60fb84689517a604162947a64788c2 100644
--- a/src/displayapp/screens/CheckboxList.h
+++ b/src/displayapp/screens/CheckboxList.h
@@ -3,11 +3,10 @@
 #include <lvgl/lvgl.h>
 #include <cstdint>
 #include <memory>
+#include <array>
 #include "displayapp/screens/Screen.h"
 #include "displayapp/Apps.h"
 #include "components/settings/Settings.h"
-
-#define MAXLISTITEMS 4
 
 namespace Pinetime {
   namespace Applications {