Don't show popup for invalid commands (#3635)

pull/2245/head
Kelrap 3 months ago committed by GitHub
parent d970d985b3
commit f4f1113277
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -921,20 +921,16 @@ class ChatController extends State<ChatPageWithRoom>
// Pangea#
if (commandMatch != null &&
!sendingClient.commands.keys.contains(commandMatch[1]!.toLowerCase())) {
final l10n = L10n.of(context);
final dialogResult = await showOkCancelAlertDialog(
context: context,
title: l10n.commandInvalid,
message: l10n.commandMissing(commandMatch[0]!),
okLabel: l10n.sendAsText,
cancelLabel: l10n.cancel,
);
// #Pangea
// final l10n = L10n.of(context);
// final dialogResult = await showOkCancelAlertDialog(
// context: context,
// title: l10n.commandInvalid,
// message: l10n.commandMissing(commandMatch[0]!),
// okLabel: l10n.sendAsText,
// cancelLabel: l10n.cancel,
// );
// if (dialogResult == OkCancelResult.cancel) return;
if (dialogResult == OkCancelResult.cancel) {
clearFakeEvent(tempEventId);
return;
}
// Pangea#
parseCommands = false;
}

Loading…
Cancel
Save