mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-03 03:11:57 +00:00
feat: open a conversation on its first unread message, under a "New" line
Both UIs: a channel, DM or room with unread messages opens on the oldest of
them (MessageHistory::firstUnreadChannel / firstUnreadDm, own messages not
counted), a "New" line above it, so it reads down to the newest. Nothing
unread: the newest, as before.
L1: the first unread is selected and scrolled up top with the line in view;
the channel's unread count now counts down as you read towards the newest.
L2: the page holding it, scrolled to the line; an incoming message scrolls
down only when the list is already at its end. Sim hooks: sim_unread (L1),
sim_open("unread") (L2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,7 @@ public:
|
||||
void simMapAt(const char* spec); // Map tools > Live tiles
|
||||
void simCompose(const char* text); // the open thread's field: this text, keyboard up
|
||||
void simDm(); // the first chat contact's thread
|
||||
void simUnread(); // read and new messages to open on
|
||||
void simSend() { sendFromCompose(); } // the field, sent
|
||||
// Navigation map (NavMap.h)
|
||||
void navTargetsPopup();
|
||||
@@ -425,6 +426,7 @@ private:
|
||||
void buildNode();
|
||||
void refreshNode();
|
||||
void buildThread();
|
||||
void threadOpenAt(int first);
|
||||
void refreshThread();
|
||||
void refreshThreadAges();
|
||||
uint32_t threadSignature() const;
|
||||
@@ -539,6 +541,9 @@ private:
|
||||
bool _thread_is_channel = false;
|
||||
int _thread_skip = 0; // newest messages above the page shown (Older / Newer)
|
||||
bool _thread_scroll_top = false;
|
||||
int _thread_new = -1; // on opening: newest-first index of the first unread (-1: none)
|
||||
uint32_t _thread_new_key = 0; // and that message, marked with "New" while the thread is open
|
||||
bool _thread_new_on = false;
|
||||
int loadThreadPage(int& total);
|
||||
uint8_t _thread_channel = 0;
|
||||
uint8_t _thread_key[PUB_KEY_SIZE] = {0};
|
||||
|
||||
Reference in New Issue
Block a user