Add support for notification title. The notification buffer must contain the title and the message separated by a '\0' character.
If the buffer does not contain any \0, the whole buffer is considered to be the message of the notification. A default title will be displayed in the notification app.
This commit is contained in:
@@ -165,6 +165,7 @@ void AlertNotificationClient::OnNotification(ble_gap_event *event) {
|
||||
NotificationManager::Notification notif;
|
||||
os_mbuf_copydata(event->notify_rx.om, headerSize, messageSize - 1, notif.message.data());
|
||||
notif.message[messageSize - 1] = '\0';
|
||||
notif.size = messageSize;
|
||||
notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert;
|
||||
notificationManager.Push(std::move(notif));
|
||||
|
||||
|
Reference in New Issue
Block a user