fix: messages that arrive while asleep or locked stay unread

A conversation left open under the lock screen or a dark display no longer
counts as read: the counters and the lock screen's tally go up, and on
waking (L2: on unlocking) the conversation reopens on its first unread
under the "New" line, a typed draft kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-08 23:41:40 +02:00
co-authored by Claude Opus 5.5
parent 92e379e05c
commit e09a90b325
6 changed files with 57 additions and 5 deletions
+2
View File
@@ -60,6 +60,7 @@ class UITask : public UITaskBase, public UiCoreHost {
GenericVibration vibration;
#endif
unsigned long _next_refresh, _auto_off;
bool _display_was_on = true; // loop(): the display back on and unlocked
NodePrefs* _node_prefs;
bool _locked;
bool _tool_from_home = false;
@@ -285,6 +286,7 @@ public:
void simCompose(const char* text); // sim tests: a channel post's keyboard holding `text`
void simMessage(const char* text); // sim tests: a channel message arrives
void simUnread(int which); // sim tests: read and new messages, opened
void simDisplay(bool on); // sim tests: the display off / on
#endif
void openContactDM(const ContactInfo& ci);
void openChannelHistory(uint8_t channel_idx); // Favourites dial: open a pinned channel