refactor: cleanup

This commit is contained in:
cogwheel0
2025-09-02 00:04:21 +05:30
parent 1b65743b06
commit 66935d1b0f
8 changed files with 29 additions and 39 deletions

View File

@@ -1164,11 +1164,9 @@ class _ModernChatInputState extends ConsumerState<ModernChatInput>
_textSub?.cancel();
_textSub = stream.listen(
(text) async {
final updated =
(_baseTextAtStart.isEmpty
? ''
: (_baseTextAtStart.trimRight() + ' ')) +
text;
final updated = _baseTextAtStart.isEmpty
? text
: '${_baseTextAtStart.trimRight()} $text';
_controller.value = TextEditingValue(
text: updated,
selection: TextSelection.collapsed(offset: updated.length),