fix: improve message sending logic and handle range download errors in translation service

This commit is contained in:
zjs81
2026-04-02 19:52:43 -07:00
parent 2b826757cb
commit 01ad8471cc
3 changed files with 13 additions and 15 deletions
+2 -4
View File
@@ -642,10 +642,6 @@ class _ChatScreenState extends State<ChatScreen> {
}
_lastTextSendAt = now;
// Clear input synchronously to prevent double-send
_textController.clear();
_textFieldFocusNode.requestFocus();
final settings = context.read<AppSettingsService>().settings;
final translationService = context.read<TranslationService>();
var outgoingText = text;
@@ -683,6 +679,8 @@ class _ChatScreenState extends State<ChatScreen> {
return;
}
_textController.clear();
_textFieldFocusNode.requestFocus();
connector.sendMessage(
_resolveContact(connector),
outgoingText,