Clean up
This commit is contained in:
parent
0c93fc39e1
commit
b386e1b9a4
|
@ -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(
|
||||||
|
|
|
@ -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") {
|
||||||
|
|
Loading…
Reference in a new issue