From 0aead42fdf5137becefb11f056fe8e567e2f454a Mon Sep 17 00:00:00 2001 From: JF Date: Sat, 2 Sep 2023 19:43:39 +0200 Subject: 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. --- src/displayapp/screens/Navigation.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/displayapp/screens/Navigation.h') diff --git a/src/displayapp/screens/Navigation.h b/src/displayapp/screens/Navigation.h index ab81d48c..eb243b01 100644 --- a/src/displayapp/screens/Navigation.h +++ b/src/displayapp/screens/Navigation.h @@ -26,6 +26,7 @@ namespace Pinetime { namespace Controllers { class NavigationService; + class FS; } namespace Applications { @@ -36,6 +37,7 @@ namespace Pinetime { ~Navigation() override; void Refresh() override; + static bool IsAvailable(Pinetime::Controllers::FS& filesystem); private: lv_obj_t* imgFlag; -- cgit v1.2.3-70-g09d2