NotificationManager.h: Reorder notification struct fields to allow easier creation. (#1774)

This commit changes the order for the notification struct fields to allow the creation of notifications using a string literal.
```cpp
NotificationManager::Notifiation notification {
  "String literal with notification text",
  42,
  NotificationManager::Categories::SimpleAlert
};
```

Co-authored-by: minacode <minamoto9@web.de>
This commit is contained in:
Max Friedrich 2023-07-09 14:39:38 +02:00 committed by GitHub
parent 5f3acfadd2
commit 39d5b5c3a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,11 +27,12 @@ namespace Pinetime {
struct Notification { struct Notification {
using Id = uint8_t; using Id = uint8_t;
using Idx = uint8_t; using Idx = uint8_t;
std::array<char, MessageSize + 1> message;
uint8_t size;
Categories category = Categories::Unknown;
Id id = 0; Id id = 0;
bool valid = false; bool valid = false;
uint8_t size;
std::array<char, MessageSize + 1> message;
Categories category = Categories::Unknown;
const char* Message() const; const char* Message() const;
const char* Title() const; const char* Title() const;