mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 09:45:14 +00:00
Clean up
This commit is contained in:
parent
0c93fc39e1
commit
b386e1b9a4
2 changed files with 7 additions and 0 deletions
|
@ -61,6 +61,7 @@ class _NewGroupDialogState extends State<NewGroupDialog> {
|
|||
TextField(
|
||||
controller: controller,
|
||||
autocorrect: false,
|
||||
autofocus: true,
|
||||
textInputAction: TextInputAction.go,
|
||||
onSubmitted: (s) => submitAction(context),
|
||||
decoration: InputDecoration(
|
||||
|
|
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue