mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 09:35:12 +00:00
refactor: Change group description to chat description
This commit is contained in:
parent
d9c5cbea26
commit
0836a5c862
4 changed files with 12 additions and 29 deletions
|
@ -76,11 +76,7 @@
|
||||||
"mxid": {}
|
"mxid": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"addGroupDescription": "Add a group description",
|
"addChatDescription": "Add a chat description",
|
||||||
"@addGroupDescription": {
|
|
||||||
"type": "text",
|
|
||||||
"placeholders": {}
|
|
||||||
},
|
|
||||||
"addToSpace": "Add to space",
|
"addToSpace": "Add to space",
|
||||||
"@addToSpace": {},
|
"@addToSpace": {},
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
|
@ -922,16 +918,8 @@
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"groupDescription": "Group description",
|
"chatDescription": "Chat description",
|
||||||
"@groupDescription": {
|
"chatDescriptionHasBeenChanged": "Chat description changed",
|
||||||
"type": "text",
|
|
||||||
"placeholders": {}
|
|
||||||
},
|
|
||||||
"groupDescriptionHasBeenChanged": "Group description changed",
|
|
||||||
"@groupDescriptionHasBeenChanged": {
|
|
||||||
"type": "text",
|
|
||||||
"placeholders": {}
|
|
||||||
},
|
|
||||||
"groupIsPublic": "Group is public",
|
"groupIsPublic": "Group is public",
|
||||||
"@groupIsPublic": {
|
"@groupIsPublic": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -1052,7 +1040,7 @@
|
||||||
"groupName": {}
|
"groupName": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"noGroupDescriptionYet": "No group description created yet.",
|
"noChatDescriptionYet": "No chat description created yet.",
|
||||||
"anyoneCanKnock": "Anyone can knock",
|
"anyoneCanKnock": "Anyone can knock",
|
||||||
"noOneCanJoin": "No one can join",
|
"noOneCanJoin": "No one can join",
|
||||||
"tryAgain": "Try again",
|
"tryAgain": "Try again",
|
||||||
|
@ -1835,11 +1823,7 @@
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"setGroupDescription": "Set group description",
|
"setChatDescription": "Set chat description",
|
||||||
"@setGroupDescription": {
|
|
||||||
"type": "text",
|
|
||||||
"placeholders": {}
|
|
||||||
},
|
|
||||||
"setInvitationLink": "Set invitation link",
|
"setInvitationLink": "Set invitation link",
|
||||||
"@setInvitationLink": {
|
"@setInvitationLink": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
|
|
@ -199,12 +199,12 @@ class ChatDetailsController extends State<ChatDetails> {
|
||||||
final room = Matrix.of(context).client.getRoomById(roomId!)!;
|
final room = Matrix.of(context).client.getRoomById(roomId!)!;
|
||||||
final input = await showTextInputDialog(
|
final input = await showTextInputDialog(
|
||||||
context: context,
|
context: context,
|
||||||
title: L10n.of(context)!.setGroupDescription,
|
title: L10n.of(context)!.setChatDescription,
|
||||||
okLabel: L10n.of(context)!.ok,
|
okLabel: L10n.of(context)!.ok,
|
||||||
cancelLabel: L10n.of(context)!.cancel,
|
cancelLabel: L10n.of(context)!.cancel,
|
||||||
textFields: [
|
textFields: [
|
||||||
DialogTextField(
|
DialogTextField(
|
||||||
hintText: L10n.of(context)!.noGroupDescriptionYet,
|
hintText: L10n.of(context)!.noChatDescriptionYet,
|
||||||
initialText: room.topic,
|
initialText: room.topic,
|
||||||
minLines: 4,
|
minLines: 4,
|
||||||
maxLines: 8,
|
maxLines: 8,
|
||||||
|
@ -219,7 +219,7 @@ class ChatDetailsController extends State<ChatDetails> {
|
||||||
if (success.error == null) {
|
if (success.error == null) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(L10n.of(context)!.groupDescriptionHasBeenChanged),
|
content: Text(L10n.of(context)!.chatDescriptionHasBeenChanged),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
if (!room.canChangeStateEvent(EventTypes.RoomTopic))
|
if (!room.canChangeStateEvent(EventTypes.RoomTopic))
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context)!.groupDescription,
|
L10n.of(context)!.chatDescription,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -222,8 +222,7 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: OutlinedButton.icon(
|
child: OutlinedButton.icon(
|
||||||
onPressed: controller.setTopicAction,
|
onPressed: controller.setTopicAction,
|
||||||
label:
|
label: Text(L10n.of(context)!.setChatDescription),
|
||||||
Text(L10n.of(context)!.setGroupDescription),
|
|
||||||
icon: const Icon(Icons.edit_outlined),
|
icon: const Icon(Icons.edit_outlined),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -233,7 +232,7 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: SelectableLinkify(
|
child: SelectableLinkify(
|
||||||
text: room.topic.isEmpty
|
text: room.topic.isEmpty
|
||||||
? L10n.of(context)!.noGroupDescriptionYet
|
? L10n.of(context)!.noChatDescriptionYet
|
||||||
: room.topic,
|
: room.topic,
|
||||||
options: const LinkifyOptions(humanize: false),
|
options: const LinkifyOptions(humanize: false),
|
||||||
linkStyle:
|
linkStyle:
|
||||||
|
|
|
@ -147,7 +147,7 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
||||||
if (profile?.topic?.isNotEmpty ?? false)
|
if (profile?.topic?.isNotEmpty ?? false)
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context)!.groupDescription,
|
L10n.of(context)!.chatDescription,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue