From 2a0ba3f188d7a00af41558693d0ddf0c69ea136e Mon Sep 17 00:00:00 2001 From: Kaj Schittecat Date: Sun, 9 Aug 2026 14:44:23 +0200 Subject: [PATCH] touch: retried messages appear in the open chat immediately (#248) The composer's send button calls composerSend() and then refreshes the open detail itself. The two programmatic resend paths (long-press menu Resend and the failed-bubble one-tap retry) called composerSend() without the refresh, so the new bubble only appeared once something else redrew the thread. Mirror the send button: refresh the open dm/ch detail + dirty the thread list after a successful resend. Co-Authored-By: Claude Fable 5 --- src/ui-touch/UITask.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ui-touch/UITask.cpp b/src/ui-touch/UITask.cpp index 2038d6b..6ba22e4 100644 --- a/src/ui-touch/UITask.cpp +++ b/src/ui-touch/UITask.cpp @@ -30240,8 +30240,16 @@ static void msgMenuResendCb(lv_event_t* e) { if (a) lv_indev_wait_release(a); closeMsgActionMenu(); if (!s_msg_menu_text[0]) return; - if (!g_lv.task->composerSend(s_msg_menu_text)) + if (!g_lv.task->composerSend(s_msg_menu_text)) { g_lv.task->showAlert(TR("Resend failed"), 1400); + return; + } + // The composer's send button refreshes the open detail itself; this + // programmatic path must too, or the new bubble only appears when something + // else redraws the thread (#248). + if (g_lv.dm.detail_open) refreshChatDetailAsync(g_lv.dm); + if (g_lv.ch.detail_open) refreshChatDetailAsync(g_lv.ch); + g_lv.dirty_threads = true; } static void msgMenuDeleteCb(lv_event_t* e) { @@ -30269,8 +30277,13 @@ static void msgMenuDeleteCb(lv_event_t* e) { static char s_retry_text[UITask::MAX_MSG_TEXT + 1] = ""; static void retryConfirmedApply() { if (!g_lv.task || !s_retry_text[0]) return; - if (!g_lv.task->composerSend(s_retry_text)) + if (!g_lv.task->composerSend(s_retry_text)) { g_lv.task->showAlert(TR("Resend failed"), 1400); + return; + } + if (g_lv.dm.detail_open) refreshChatDetailAsync(g_lv.dm); // see msgMenuResendCb (#248) + if (g_lv.ch.detail_open) refreshChatDetailAsync(g_lv.ch); + g_lv.dirty_threads = true; } static void bubbleRetryTapCb(lv_event_t* e) { if (lv_event_get_code(e) != LV_EVENT_CLICKED || !g_lv.task) return;