refactor: use PopupMenu in keyboard and context menus, fix bugs

- KeyboardWidget: replace inline placeholder overlay with PopupMenu
- UITask QuickMsgScreen: replace inline CONTACT_PICK/CHANNEL_PICK context
  menus with PopupMenu; notif label stored in _ctx_notif_item at open time
- BotScreen: clear placeholder list for trigger field (expansion tokens
  would never match incoming literal text)
- MsgExpand: fix APPEND macro off-by-one (oi+_l < out_len-1 → < out_len)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-14 08:06:26 +02:00
co-authored by Claude Sonnet 4.6
parent 2f32683494
commit 7b63af1068
4 changed files with 57 additions and 157 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ inline void expandMsg(const char* tmpl, char* out, int out_len,
// helper macro: append a buffer whose length is already known
#define APPEND(s, slen) do { \
int _l = (slen); \
if (oi + _l < out_len - 1) { memcpy(out + oi, (s), _l); oi += _l; } \
if (oi + _l < out_len) { memcpy(out + oi, (s), _l); oi += _l; } \
} while(0)
if (strncmp(p, "{loc}", 5) == 0) {