aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/ApplicationList.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/ApplicationList.h')
-rw-r--r--src/displayapp/screens/ApplicationList.h38
1 files changed, 10 insertions, 28 deletions
diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h
index 371ee710..2ad9c7c7 100644
--- a/src/displayapp/screens/ApplicationList.h
+++ b/src/displayapp/screens/ApplicationList.h
@@ -2,15 +2,12 @@
#include <array>
#include <memory>
-
-#include "displayapp/screens/Screen.h"
-#include "displayapp/screens/ScreenList.h"
-#include "components/datetime/DateTimeController.h"
-#include "components/settings/Settings.h"
-#include "components/battery/BatteryController.h"
-#include "displayapp/screens/Symbols.h"
-#include "displayapp/screens/Tile.h"
-#include "displayapp/screens/Navigation.h"
+#include "displayapp/Apps.h"
+#include "Screen.h"
+#include "ScreenList.h"
+#include "displayapp/Controllers.h"
+#include "Symbols.h"
+#include "Tile.h"
namespace Pinetime {
namespace Applications {
@@ -22,7 +19,8 @@ namespace Pinetime {
const Pinetime::Controllers::Battery& batteryController,
const Pinetime::Controllers::Ble& bleController,
Controllers::DateTime& dateTimeController,
- Pinetime::Controllers::FS& filesystem);
+ Pinetime::Controllers::FS& filesystem,
+ std::array<Tile::Applications, UserAppTypes::Count>&& apps);
~ApplicationList() override;
bool OnTouchEvent(TouchEvents event) override;
@@ -36,29 +34,13 @@ namespace Pinetime {
const Pinetime::Controllers::Ble& bleController;
Controllers::DateTime& dateTimeController;
Pinetime::Controllers::FS& filesystem;
+ std::array<Tile::Applications, UserAppTypes::Count> apps;
static constexpr int appsPerScreen = 6;
// Increment this when more space is needed
- static constexpr int nScreens = 2;
-
- std::array<Tile::Applications, appsPerScreen * nScreens> applications {{
- {Symbols::stopWatch, Apps::StopWatch, true},
- {Symbols::clock, Apps::Alarm, true},
- {Symbols::hourGlass, Apps::Timer, true},
- {Symbols::shoe, Apps::Steps, true},
- {Symbols::heartBeat, Apps::HeartRate, true},
- {Symbols::music, Apps::Music, true},
-
- {Symbols::paintbrush, Apps::Paint, true},
- {Symbols::paddle, Apps::Paddle, true},
- {"2", Apps::Twos, true},
- {Symbols::drum, Apps::Metronome, true},
- {Symbols::map, Apps::Navigation, Applications::Screens::Navigation::IsAvailable(filesystem)},
- {Symbols::none, Apps::None, false},
+ static constexpr int nScreens = (UserAppTypes::Count/appsPerScreen)+1;
- // {"M", Apps::Motion},
- }};
ScreenList<nScreens> screens;
};
}