mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-23 20:49:26 +01:00
Merge branch 'soru/fix-only-prefix-on-complex-bundles' into 'main'
fix: Only use prefix switching if we have complex bundles See merge request famedly/fluffychat!525
This commit is contained in:
commit
6bd332f756
@ -739,17 +739,19 @@ class ChatController extends State<Chat> {
|
||||
}
|
||||
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user