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:
parent
5f3acfadd2
commit
39d5b5c3a2
@ -27,11 +27,12 @@ namespace Pinetime {
|
||||
struct Notification {
|
||||
using Id = uint8_t;
|
||||
using Idx = uint8_t;
|
||||
|
||||
std::array<char, MessageSize + 1> message;
|
||||
uint8_t size;
|
||||
Categories category = Categories::Unknown;
|
||||
Id id = 0;
|
||||
bool valid = false;
|
||||
uint8_t size;
|
||||
std::array<char, MessageSize + 1> message;
|
||||
Categories category = Categories::Unknown;
|
||||
|
||||
const char* Message() const;
|
||||
const char* Title() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user