From b386e1b9a46c54ccb978ef1b5e395feabe6b8ad9 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 19 Jan 2020 17:12:03 +0100 Subject: [PATCH] Clean up --- lib/components/dialogs/new_group_dialog.dart | 1 + lib/utils/event_extension.dart | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/components/dialogs/new_group_dialog.dart b/lib/components/dialogs/new_group_dialog.dart index 65dfca0..36d4197 100644 --- a/lib/components/dialogs/new_group_dialog.dart +++ b/lib/components/dialogs/new_group_dialog.dart @@ -61,6 +61,7 @@ class _NewGroupDialogState extends State { TextField( controller: controller, autocorrect: false, + autofocus: true, textInputAction: TextInputAction.go, onSubmitted: (s) => submitAction(context), decoration: InputDecoration( diff --git a/lib/utils/event_extension.dart b/lib/utils/event_extension.dart index 7793bb3..75f800f 100644 --- a/lib/utils/event_extension.dart +++ b/lib/utils/event_extension.dart @@ -59,6 +59,12 @@ extension LocalizedBody on Event { if (newMembership != oldMembership) { if (oldMembership == "invite" && newMembership == "join") { text = "$targetName has accepted the invitation"; + } else if (oldMembership == "invite" && newMembership == "leave") { + if (this.stateKey == this.senderId) { + text = "$targetName has rejected the invitation"; + } else { + text = "$senderName has withdrawn the invitation for $targetName"; + } } else if (oldMembership == "leave" && newMembership == "join") { text = "$targetName has joined the chat"; } else if (oldMembership == "join" && newMembership == "ban") {