fix: Only use prefix switching if we have complex bundles
This commit is contained in:
parent
396a433cae
commit
7867af858d
|
@ -739,17 +739,19 @@ class ChatController extends State<Chat> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void onInputBarChanged(String text) {
|
void onInputBarChanged(String text) {
|
||||||
final clients = currentRoomBundle;
|
if (text.endsWith(' ') && matrix.hasComplexBundles) {
|
||||||
for (final client in clients) {
|
final clients = currentRoomBundle;
|
||||||
final prefix = client.sendPrefix;
|
for (final client in clients) {
|
||||||
if ((prefix?.isNotEmpty ?? false) &&
|
final prefix = client.sendPrefix;
|
||||||
text.toLowerCase() == '${prefix.toLowerCase()} ') {
|
if ((prefix?.isNotEmpty ?? false) &&
|
||||||
setSendingClient(client);
|
text.toLowerCase() == '${prefix.toLowerCase()} ') {
|
||||||
setState(() {
|
setSendingClient(client);
|
||||||
inputText = '';
|
setState(() {
|
||||||
sendController.text = '';
|
inputText = '';
|
||||||
});
|
sendController.text = '';
|
||||||
return;
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typingCoolDown?.cancel();
|
typingCoolDown?.cancel();
|
||||||
|
|
Loading…
Reference in New Issue