mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-05 19:56:11 +00:00
feat: DM per-contact notification settings and mark-as-read
Long-press ENTER in the DM contact list opens a context menu with: - "Mark as read": clears unread counter for that contact - "Notif: default/OFF/ON": cycles notification state (same as channels) Notification state is persisted in NodePrefs (dm_notif[16] table, keyed by 4-byte pub_key prefix). When muted, the buzzer is silenced for that contact's messages; when force-on, buzzer plays even in quiet mode. Default follows the global buzzer setting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b50f21060c
commit
eb0f436924
@@ -38,6 +38,8 @@ class UITask : public AbstractUITask {
|
||||
int _msgcount;
|
||||
int _room_unread;
|
||||
int _last_notif_ch_idx;
|
||||
uint8_t _last_notif_dm_prefix[4];
|
||||
bool _last_notif_dm_valid;
|
||||
struct DMUnreadEntry { uint8_t prefix[4]; uint8_t count; };
|
||||
static const int DM_UNREAD_TABLE_SIZE = 16;
|
||||
DMUnreadEntry _dm_unread_table[DM_UNREAD_TABLE_SIZE];
|
||||
@@ -81,6 +83,8 @@ public:
|
||||
_batt_mv = 0;
|
||||
_msgcount = _room_unread = 0;
|
||||
_last_notif_ch_idx = -1;
|
||||
_last_notif_dm_valid = false;
|
||||
memset(_last_notif_dm_prefix, 0, sizeof(_last_notif_dm_prefix));
|
||||
memset(_dm_unread_table, 0, sizeof(_dm_unread_table));
|
||||
curr = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user