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 <noreply@anthropic.com>
This commit is contained in:
Kaj SchittecatandClaude Fable 5 committed 2026-08-09 14:44:23 +02:00
1 parent f5fce43707
commit 2a0ba3f188
1 file changed
+15 -2
+15 -2
View File
@@ -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;