Channel chat: Resend action on own messages

Long-pressing one of your own channel messages offers Resend. It sends the same text again as a new message, using the channel's flood scope like a normal send. Useful when no repeats of the first copy were heard.
This commit is contained in:
Juraj Bednar committed 2026-11-22 16:50:43 +01:00
1 parent 9ac915bdf2
commit 5059676df3
42 files changed
+127

No files matched your search

+19
View File
@@ -5623,6 +5623,25 @@ class MeshCoreConnector extends ChangeNotifier {
}
}
/// Sends an own channel message again as a new message (new timestamp),
/// so repeaters forward it even if they already saw the first copy.
/// Uses the channel's current flood scope, like a normal send.
Future<void> resendChannelMessage(
Channel channel,
ChannelMessage message,
) async {
if (!message.isOutgoing) return;
final replyToId = message.replyToMessageId;
await sendChannelMessage(
channel,
message.fullText,
originalText: message.originalText,
translatedLanguageCode: message.translatedLanguageCode,
translationModelId: message.translationModelId,
replyTo: replyToId == null ? null : _findChannelMessageById(replyToId),
);
}
Future<void> sendChannelMessage(
Channel channel,
String text, {
+1
View File
@@ -503,6 +503,7 @@
"chat_selectSendAction": "Изберете действие за изпращане",
"chat_sendGif": "Изпрати GIF",
"chat_reply": "Отговори",
"chat_resend": "Изпрати отново",
"chat_addReaction": "Добави Реакция",
"chat_me": "Аз",
"emojiCategorySmileys": "Емотикони",
+1
View File
@@ -1086,6 +1086,7 @@
"chat_imagePickFailed": "Obrázek se nepodařilo otevřít",
"chat_receivedGif": "Přijat GIF",
"chat_reply": "Odpovědět",
"chat_resend": "Odeslat znovu",
"chat_addReaction": "Přidat reakci",
"chat_me": "Já",
"reaction_report": "Emoji reakce",
+1
View File
@@ -525,6 +525,7 @@
"chat_selectSendAction": "Sendeaktion auswählen",
"chat_sendGif": "GIF senden",
"chat_reply": "Antworten",
"chat_resend": "Erneut senden",
"chat_addReaction": "Reaktion hinzufügen",
"chat_me": "Ich",
"emojiCategorySmileys": "Emoticons",
+1
View File
@@ -1290,6 +1290,7 @@
},
"chat_receivedGif": "Received a GIF",
"chat_reply": "Reply",
"chat_resend": "Resend",
"chat_addReaction": "Add Reaction",
"chat_me": "Me",
"reaction_report": "Emoji Reactions",
+1
View File
@@ -517,6 +517,7 @@
"chat_selectSendAction": "Seleccionar acción de envío",
"chat_sendGif": "Enviar GIF",
"chat_reply": "Responder",
"chat_resend": "Reenviar",
"chat_addReaction": "Añadir Reacción",
"chat_me": "Yo",
"emojiCategorySmileys": "Emoticones",
+1
View File
@@ -517,6 +517,7 @@
"chat_selectSendAction": "Sélectionner une action d’envoi",
"chat_sendGif": "Envoyer un GIF",
"chat_reply": "Répondre",
"chat_resend": "Renvoyer",
"chat_addReaction": "Ajouter une réaction",
"chat_me": "Moi",
"emojiCategorySmileys": "Émojis",
+1
View File
@@ -703,6 +703,7 @@
"chat_selectSendAction": "Küldési művelet kiválasztása",
"chat_sendGif": "GIF küldése",
"chat_reply": "Válasz",
"chat_resend": "Újraküldés",
"chat_addReaction": "Reakció hozzáadása",
"chat_me": "Nekem",
"emojiCategorySmileys": "Hangulatjelek",
+1
View File
@@ -562,6 +562,7 @@
"chat_selectSendAction": "Seleziona azione di invio",
"chat_sendGif": "Invia GIF",
"chat_reply": "Rispondi",
"chat_resend": "Reinvia",
"chat_addReaction": "Aggiungi Reazione",
"chat_me": "Io",
"emojiCategorySmileys": "Emoji",
+1
View File
@@ -677,6 +677,7 @@
"chat_selectSendAction": "送信アクションを選択",
"chat_sendGif": "GIF を送信",
"chat_reply": "返信",
"chat_resend": "再送信",
"chat_addReaction": "リアクションを追加",
"chat_me": "私",
"emojiCategorySmileys": "顔文字",
+1
View File
@@ -659,6 +659,7 @@
"chat_selectSendAction": "전송 작업 선택",
"chat_sendGif": "GIF 보내기",
"chat_reply": "답변",
"chat_resend": "다시 보내기",
"chat_addReaction": "댓글 추가",
"chat_me": "나",
"emojiCategorySmileys": "이모티콘",
+6
View File
@@ -4387,6 +4387,12 @@ abstract class AppLocalizations {
/// **'Reply'**
String get chat_reply;
/// No description provided for @chat_resend.
///
/// In en, this message translates to:
/// **'Resend'**
String get chat_resend;
/// No description provided for @chat_addReaction.
///
/// In en, this message translates to:
+3
View File
@@ -2521,6 +2521,9 @@ class AppLocalizationsBg extends AppLocalizations {
@override
String get chat_reply => 'Отговори';
@override
String get chat_resend => 'Изпрати отново';
@override
String get chat_addReaction => 'Добави Реакция';
+3
View File
@@ -2512,6 +2512,9 @@ class AppLocalizationsCs extends AppLocalizations {
@override
String get chat_reply => 'Odpovědět';
@override
String get chat_resend => 'Odeslat znovu';
@override
String get chat_addReaction => 'Přidat reakci';
+3
View File
@@ -2524,6 +2524,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get chat_reply => 'Antworten';
@override
String get chat_resend => 'Erneut senden';
@override
String get chat_addReaction => 'Reaktion hinzufügen';
+3
View File
@@ -2477,6 +2477,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get chat_reply => 'Reply';
@override
String get chat_resend => 'Resend';
@override
String get chat_addReaction => 'Add Reaction';
+3
View File
@@ -2515,6 +2515,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get chat_reply => 'Responder';
@override
String get chat_resend => 'Reenviar';
@override
String get chat_addReaction => 'Añadir Reacción';
+3
View File
@@ -2519,6 +2519,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get chat_reply => 'Répondre';
@override
String get chat_resend => 'Renvoyer';
@override
String get chat_addReaction => 'Ajouter une réaction';
+3
View File
@@ -2511,6 +2511,9 @@ class AppLocalizationsHu extends AppLocalizations {
@override
String get chat_reply => 'Válasz';
@override
String get chat_resend => 'Újraküldés';
@override
String get chat_addReaction => 'Reakció hozzáadása';
+3
View File
@@ -2517,6 +2517,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get chat_reply => 'Rispondi';
@override
String get chat_resend => 'Reinvia';
@override
String get chat_addReaction => 'Aggiungi Reazione';
+3
View File
@@ -2400,6 +2400,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get chat_reply => '返信';
@override
String get chat_resend => '再送信';
@override
String get chat_addReaction => 'リアクションを追加';
+3
View File
@@ -2401,6 +2401,9 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get chat_reply => '답변';
@override
String get chat_resend => '다시 보내기';
@override
String get chat_addReaction => '댓글 추가';
+3
View File
@@ -2503,6 +2503,9 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get chat_reply => 'Reageren';
@override
String get chat_resend => 'Opnieuw verzenden';
@override
String get chat_addReaction => 'Reactie toevoegen';
+3
View File
@@ -2540,6 +2540,9 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get chat_reply => 'Odpowiedz';
@override
String get chat_resend => 'Wyślij ponownie';
@override
String get chat_addReaction => 'Dodaj Reakcję';
+6
View File
@@ -2512,6 +2512,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get chat_reply => 'Responder';
@override
String get chat_resend => 'Reenviar';
@override
String get chat_addReaction => 'Adicionar Reação';
@@ -10222,6 +10225,9 @@ class AppLocalizationsPtPt extends AppLocalizationsPt {
@override
String get chat_reply => 'Responder';
@override
String get chat_resend => 'Reenviar';
@override
String get chat_addReaction => 'Adicionar reação';
+3
View File
@@ -2520,6 +2520,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get chat_reply => 'Ответить';
@override
String get chat_resend => 'Отправить снова';
@override
String get chat_addReaction => 'Добавить реакцию';
+3
View File
@@ -2513,6 +2513,9 @@ class AppLocalizationsSk extends AppLocalizations {
@override
String get chat_reply => 'Odpovedať';
@override
String get chat_resend => 'Odoslať znova';
@override
String get chat_addReaction => 'Pridať Reakciu';
+3
View File
@@ -2513,6 +2513,9 @@ class AppLocalizationsSl extends AppLocalizations {
@override
String get chat_reply => 'Odgovori';
@override
String get chat_resend => 'Pošlji znova';
@override
String get chat_addReaction => 'Dodaj reakcijo';
+3
View File
@@ -2491,6 +2491,9 @@ class AppLocalizationsSv extends AppLocalizations {
@override
String get chat_reply => 'Svara';
@override
String get chat_resend => 'Skicka igen';
@override
String get chat_addReaction => 'Lägg till reaktion';
+3
View File
@@ -2516,6 +2516,9 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get chat_reply => 'Відповісти';
@override
String get chat_resend => 'Надіслати знову';
@override
String get chat_addReaction => 'Додати реакцію';
+3
View File
@@ -2365,6 +2365,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get chat_reply => '回复';
@override
String get chat_resend => '重新发送';
@override
String get chat_addReaction => '添加表情';
+1
View File
@@ -523,6 +523,7 @@
"chat_removeGif": "GIF verwijderen",
"chat_cancelReply": "Antwoord annuleren",
"chat_reply": "Reageren",
"chat_resend": "Opnieuw verzenden",
"chat_addReaction": "Reactie toevoegen",
"chat_me": "Ik",
"emojiCategorySmileys": "Smileys",
+1
View File
@@ -513,6 +513,7 @@
"chat_selectSendAction": "Wybierz czynność wysyłania",
"chat_sendGif": "Wyślij GIF",
"chat_reply": "Odpowiedz",
"chat_resend": "Wyślij ponownie",
"chat_addReaction": "Dodaj Reakcję",
"chat_me": "Ja",
"emojiCategorySmileys": "Emoji",
+1
View File
@@ -495,6 +495,7 @@
"chat_selectSendAction": "Selecionar ação de envio",
"chat_sendGif": "Enviar GIF",
"chat_reply": "Responder",
"chat_resend": "Reenviar",
"chat_addReaction": "Adicionar Reação",
"chat_me": "Eu",
"emojiCategorySmileys": "Emojis",
+1
View File
@@ -682,6 +682,7 @@
"chat_imagePickFailed": "Não foi possível abrir essa imagem",
"chat_receivedGif": "Recebeu um GIF",
"chat_reply": "Responder",
"chat_resend": "Reenviar",
"chat_addReaction": "Adicionar reação",
"chat_me": "Eu",
"reaction_report": "Reações com emojis",
+1
View File
@@ -354,6 +354,7 @@
"chat_selectSendAction": "Выберите действие отправки",
"chat_sendGif": "Отправить GIF",
"chat_reply": "Ответить",
"chat_resend": "Отправить снова",
"chat_addReaction": "Добавить реакцию",
"chat_me": "Я",
"emojiCategorySmileys": "Смайлы",
+1
View File
@@ -512,6 +512,7 @@
"chat_selectSendAction": "Vybrať akciu odoslania",
"chat_sendGif": "Odoslať GIF",
"chat_reply": "Odpovedať",
"chat_resend": "Odoslať znova",
"chat_addReaction": "Pridať Reakciu",
"chat_me": "Mne",
"emojiCategorySmileys": "Emoji",
+1
View File
@@ -495,6 +495,7 @@
"chat_selectSendAction": "Izberite dejanje pošiljanja",
"chat_sendGif": "Pošlji GIF",
"chat_reply": "Odgovori",
"chat_resend": "Pošlji znova",
"chat_addReaction": "Dodaj reakcijo",
"chat_me": "jaz",
"emojiCategorySmileys": "Emoji",
+1
View File
@@ -495,6 +495,7 @@
"chat_selectSendAction": "Välj sändningsåtgärd",
"chat_sendGif": "Skicka GIF",
"chat_reply": "Svara",
"chat_resend": "Skicka igen",
"chat_addReaction": "Lägg till reaktion",
"chat_me": "Mig",
"reaction_report": "Emoji-reaktioner",
+1
View File
@@ -506,6 +506,7 @@
"chat_selectSendAction": "Виберіть дію надсилання",
"chat_sendGif": "Надіслати GIF",
"chat_reply": "Відповісти",
"chat_resend": "Надіслати знову",
"chat_addReaction": "Додати реакцію",
"chat_me": "Я",
"emojiCategorySmileys": "Емодзі",
+1
View File
@@ -522,6 +522,7 @@
"chat_selectSendAction": "选择发送操作",
"chat_sendGif": "发送 GIF",
"chat_reply": "回复",
"chat_resend": "重新发送",
"chat_addReaction": "添加表情",
"chat_me": "我",
"emojiCategorySmileys": "表情",
+22
View File
@@ -3017,6 +3017,18 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
_sendGuard.markDispatched();
}
/// Sends an own message again as a new message, e.g. when no repeats
/// were heard.
Future<void> _resendMessage(ChannelMessage message) {
return _sendGuard.runExclusive(() async {
if (!ensureRadioConnected(context)) return;
if (!_sendGuard.checkCooldown(context)) return;
final connector = context.read<MeshCoreConnector>();
unawaited(connector.resendChannelMessage(widget.channel, message));
_sendGuard.markDispatched();
});
}
void _showMessagePathInfo(ChannelMessage message) {
Navigator.push(
context,
@@ -3123,6 +3135,16 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
copyChatMessageText(context, message.fullText);
},
),
if (message.isOutgoing)
ListTile(
enabled: !readOnly,
leading: const Icon(Icons.replay),
title: Text(context.l10n.chat_resend),
onTap: () {
Navigator.pop(sheetContext);
_resendMessage(message);
},
),
if (canTranslateMessage)
ListTile(
leading: const Icon(Icons.translate),