This commit is contained in:
Christian Pauly 2020-01-19 17:12:03 +01:00
parent 0c93fc39e1
commit b386e1b9a4
2 changed files with 7 additions and 0 deletions

View file

@ -61,6 +61,7 @@ class _NewGroupDialogState extends State<NewGroupDialog> {
TextField( TextField(
controller: controller, controller: controller,
autocorrect: false, autocorrect: false,
autofocus: true,
textInputAction: TextInputAction.go, textInputAction: TextInputAction.go,
onSubmitted: (s) => submitAction(context), onSubmitted: (s) => submitAction(context),
decoration: InputDecoration( decoration: InputDecoration(

View file

@ -59,6 +59,12 @@ extension LocalizedBody on Event {
if (newMembership != oldMembership) { if (newMembership != oldMembership) {
if (oldMembership == "invite" && newMembership == "join") { if (oldMembership == "invite" && newMembership == "join") {
text = "$targetName has accepted the invitation"; 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") { } else if (oldMembership == "leave" && newMembership == "join") {
text = "$targetName has joined the chat"; text = "$targetName has joined the chat";
} else if (oldMembership == "join" && newMembership == "ban") { } else if (oldMembership == "join" && newMembership == "ban") {