chore: Follow up user dialog
This commit is contained in:
parent
993e12a946
commit
0fe91bfe14
3 changed files with 7 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ abstract class AppConfig {
|
||||||
static const String schemePrefix = 'matrix:';
|
static const String schemePrefix = 'matrix:';
|
||||||
static const String pushNotificationsChannelId = 'fluffychat_push';
|
static const String pushNotificationsChannelId = 'fluffychat_push';
|
||||||
static const String pushNotificationsAppId = 'chat.fluffy.fluffychat';
|
static const String pushNotificationsAppId = 'chat.fluffy.fluffychat';
|
||||||
static const double borderRadius = 18.0;
|
static const double borderRadius = 8.0;
|
||||||
static const double spaceBorderRadius = 11.0;
|
static const double spaceBorderRadius = 11.0;
|
||||||
static const double columnWidth = 360.0;
|
static const double columnWidth = 360.0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2780,5 +2780,6 @@
|
||||||
"mute": "Mute",
|
"mute": "Mute",
|
||||||
"@mute": {
|
"@mute": {
|
||||||
"description": "This should be a very short string because there is not much space in the button!"
|
"description": "This should be a very short string because there is not much space in the button!"
|
||||||
}
|
},
|
||||||
|
"createNewChat": "Create new chat"
|
||||||
}
|
}
|
||||||
|
|
@ -41,6 +41,7 @@ class UserDialog extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final client = Matrix.of(context).client;
|
final client = Matrix.of(context).client;
|
||||||
|
final directChatRoomId = client.getDirectChatFromUserId(profile.userId);
|
||||||
final displayname =
|
final displayname =
|
||||||
profile.displayName ??
|
profile.displayName ??
|
||||||
profile.userId.localpart ??
|
profile.userId.localpart ??
|
||||||
|
|
@ -247,7 +248,9 @@ class UserDialog extends StatelessWidget {
|
||||||
router.go('/rooms/$roomId');
|
router.go('/rooms/$roomId');
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
L10n.of(context).sendAMessage,
|
directChatRoomId != null
|
||||||
|
? L10n.of(context).createNewChat
|
||||||
|
: L10n.of(context).sendAMessage,
|
||||||
style: TextStyle(color: theme.colorScheme.secondary),
|
style: TextStyle(color: theme.colorScheme.secondary),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue