diff options
| author | JF <JF002@users.noreply.github.com> | 2023-09-02 19:43:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-02 19:43:39 +0200 |
| commit | 0aead42fdf5137becefb11f056fe8e567e2f454a (patch) | |
| tree | f5ee15d4241721c15d4653440503cbcb7a3bf128 /src/displayapp/screens/ApplicationList.cpp | |
| parent | 44d1798f4f20ac4bf9f66690e49c4bd0b2d863ff (diff) | |
navigation: Add is available (#1847)
Navigation app now needs 2 images to be loaded from the resources on the external filesystem. This PR adds an 'enabled' field to the Applications struct. This field is true for all applications expect for Navigation which calls Navigation::IsAvailable(). This methods returns true if the 2 files are available in the resources.
The application list disables the application (draws it in grey, disables the touch callback) if the enable flag is not set.
Diffstat (limited to 'src/displayapp/screens/ApplicationList.cpp')
| -rw-r--r-- | src/displayapp/screens/ApplicationList.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/displayapp/screens/ApplicationList.cpp b/src/displayapp/screens/ApplicationList.cpp index 0a65a5d4..6014cf53 100644 --- a/src/displayapp/screens/ApplicationList.cpp +++ b/src/displayapp/screens/ApplicationList.cpp @@ -6,8 +6,6 @@ using namespace Pinetime::Applications::Screens; -constexpr std::array<Tile::Applications, ApplicationList::applications.size()> ApplicationList::applications; - auto ApplicationList::CreateScreenList() const { std::array<std::function<std::unique_ptr<Screen>()>, nScreens> screens; for (size_t i = 0; i < screens.size(); i++) { @@ -22,12 +20,14 @@ ApplicationList::ApplicationList(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController, const Pinetime::Controllers::Battery& batteryController, const Pinetime::Controllers::Ble& bleController, - Controllers::DateTime& dateTimeController) + Controllers::DateTime& dateTimeController, + Pinetime::Controllers::FS& filesystem) : app {app}, settingsController {settingsController}, batteryController {batteryController}, bleController {bleController}, dateTimeController {dateTimeController}, + filesystem{filesystem}, screens {app, settingsController.GetAppMenu(), CreateScreenList(), Screens::ScreenListModes::UpDown} { } |
