diff --git a/lib/pages/chat.dart b/lib/pages/chat.dart index bc983703..562cecba 100644 --- a/lib/pages/chat.dart +++ b/lib/pages/chat.dart @@ -739,17 +739,19 @@ class ChatController extends State { } void onInputBarChanged(String text) { - final clients = currentRoomBundle; - for (final client in clients) { - final prefix = client.sendPrefix; - if ((prefix?.isNotEmpty ?? false) && - text.toLowerCase() == '${prefix.toLowerCase()} ') { - setSendingClient(client); - setState(() { - inputText = ''; - sendController.text = ''; - }); - return; + if (text.endsWith(' ') && matrix.hasComplexBundles) { + final clients = currentRoomBundle; + for (final client in clients) { + final prefix = client.sendPrefix; + if ((prefix?.isNotEmpty ?? false) && + text.toLowerCase() == '${prefix.toLowerCase()} ') { + setSendingClient(client); + setState(() { + inputText = ''; + sendController.text = ''; + }); + return; + } } } typingCoolDown?.cancel();