mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
The channel history is a single ring shared by all channels (was 32 entries), while unread counts live in a separate per-channel array. Once 32 messages had accumulated across channels, the oldest entry was evicted on each new message — but the matching _ch_unread[] counter was left untouched. The Messages badge then claimed unread messages the ring could no longer surface, so a channel showed "N unread" but opened empty. (The companion app stores its own copy over the protocol, which is why the phone could still read them.) Two changes: - addChannelMsg() now decrements _ch_unread[evicted.ch_idx] when an entry is pushed out of the ring, keeping the badge consistent with what is actually displayable. - CH_HIST_MAX raised 32 → 96 (~14 KB RAM) so eviction is far less frequent under normal multi-channel traffic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>