1
0
Fork 0

Revert invalid changes in Navigation.h and add missing changes in Notifications.h.

This commit is contained in:
Jean-François Milants 2021-01-24 17:27:48 +01:00
parent 219bafb01a
commit 3d1881c5ab
2 changed files with 8 additions and 3 deletions

View file

@ -145,7 +145,7 @@ namespace Pinetime {
const lv_img_dsc_t* iconForName(std::string icon); const lv_img_dsc_t* iconForName(std::string icon);
std::array<std::pair<std::string, const lv_img_dsc_t*>, 89 > m_iconMap;/* = { { std::array<std::pair<std::string, const lv_img_dsc_t*>, 89 > m_iconMap = { {
{"arrive-left", &arrive_left}, {"arrive-left", &arrive_left},
{"arrive-right", &arrive_right}, {"arrive-right", &arrive_right},
{"arrive-straight", &arrive_straight}, {"arrive-straight", &arrive_straight},
@ -231,7 +231,7 @@ namespace Pinetime {
{"turn-slight-right", &turn_slight_right}, {"turn-slight-right", &turn_slight_right},
{"turn-straight", &turn_straight}, {"turn-straight", &turn_straight},
{"updown", &updown}, {"updown", &updown},
{"uturn", &uturn} } };*/ {"uturn", &uturn} } };
}; };
} }
} }

View file

@ -7,12 +7,16 @@
#include "components/ble/NotificationManager.h" #include "components/ble/NotificationManager.h"
namespace Pinetime { namespace Pinetime {
namespace Controllers {
class AlertNotificationService;
}
namespace Applications { namespace Applications {
namespace Screens { namespace Screens {
class Notifications : public Screen { class Notifications : public Screen {
public: public:
enum class Modes {Normal, Preview}; enum class Modes {Normal, Preview};
explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Modes mode); explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::AlertNotificationService& alertNotificationService, Modes mode);
~Notifications() override; ~Notifications() override;
bool Refresh() override; bool Refresh() override;
@ -55,6 +59,7 @@ namespace Pinetime {
const char* text; const char* text;
}; };
Pinetime::Controllers::NotificationManager& notificationManager; Pinetime::Controllers::NotificationManager& notificationManager;
Pinetime::Controllers::AlertNotificationService& alertNotificationService;
Modes mode = Modes::Normal; Modes mode = Modes::Normal;
std::unique_ptr<NotificationItem> currentItem; std::unique_ptr<NotificationItem> currentItem;
Controllers::NotificationManager::Notification::Id currentId; Controllers::NotificationManager::Notification::Id currentId;