mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
fix(bot): channel auto-replies now render as outgoing in history
tryBotReplyChannel() mirrored its own reply into the on-device history prefixed with the node's own name instead of the "Me: " convention the history view uses to tell an outgoing bubble from an incoming one, so the bot's own reply rendered left-anchored like a message from someone else labelled with the device's own name.
This commit is contained in:
@@ -200,8 +200,11 @@ void MyMesh::tryBotReplyChannel(uint8_t channel_idx, const char* text, uint8_t h
|
||||
_bot_reply_count++;
|
||||
#ifdef DISPLAY_CLASS
|
||||
if (_ui) {
|
||||
char with_sender[240]; // node_name(32) + ": "(2) + expanded(200) + margin
|
||||
snprintf(with_sender, sizeof(with_sender), "%s: %s", _prefs.node_name, expanded);
|
||||
// "Me: " (not node_name) -- MessagesScreen recognises an outgoing bubble
|
||||
// by that literal prefix (see computeBubbleBox's caller), same framing
|
||||
// MessagesScreen::afterSend and the app-originated-post mirror use.
|
||||
char with_sender[240]; // "Me: "(4) + expanded(200) + margin
|
||||
snprintf(with_sender, sizeof(with_sender), "Me: %s", expanded);
|
||||
_ui->addChannelMsg(channel_idx, with_sender, 0, nullptr, 0, true); // own_message: our own bot reply, never unread
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
### Fixes
|
||||
|
||||
- **Remote Bot's channel auto-replies showed up in the device's own history as if someone else had sent them, labelled with the device's own name.** The reply was stored with the device's node name as the sender prefix instead of the `"Me: "` convention the history view uses to tell an outgoing post apart from an incoming one, so the bubble rendered left-anchored like an incoming message. Now framed the same way an on-device or app-originated channel post is.
|
||||
- **A room server could end up pinned to the Favourites Dial and then never be removed.** The pin picker's "recent conversations" tier didn't filter by contact type, and room posts share the DM history, so a room could appear there; opening it from the dial then skipped the login handshake, and Unpin only existed in the chat contact list, which rooms never appear in. Rooms are now pinned deliberately (and open correctly), and any tile can be unpinned from the dial itself.
|
||||
- **Bluetooth connect/disconnect/reconnect cycles (e.g. a phone drifting in and out of range) could make the device nearly unresponsive for a few seconds at a time**, including briefly after turning BLE off. A failed BLE notify was retried on a fixed short interval, repeatedly hitting a blocking wait deep in the BLE stack while the link stayed marginal. Failed sends now back off exponentially (capped at 2s) instead of hammering the same blocking call.
|
||||
- **Enter on a `Notif:` / `Melody:` / `Fav:` / `Sort:` row in a context menu now changes the value instead of closing the menu.** Those rows show a value you step through with LEFT/RIGHT, but Enter treated them as ordinary menu picks and dismissed the popup, so changing two of them meant reopening the menu in between. Enter now advances the value and the menu stays open — only Back closes it — across the Messages contact/room/channel menus, Tools › Nodes, and the Ringtone editor, matching what Trail › Settings already did. The Nodes `Fav` row was the worst of it: LEFT/RIGHT did nothing there at all, so the only way to toggle a favourite was an Enter that closed the menu on every flip.
|
||||
|
||||
Reference in New Issue
Block a user