diff --git a/lib/widgets/account/account_pfc.dart b/lib/widgets/account/account_pfc.dart index 0922baa..e2919ed 100644 --- a/lib/widgets/account/account_pfc.dart +++ b/lib/widgets/account/account_pfc.dart @@ -26,7 +26,7 @@ class AccountProfileCard extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final account = ref.watch(accountProvider(uname)); final width = - math.max(MediaQuery.of(context).size.width - 80, 360).toDouble(); + math.min(MediaQuery.of(context).size.width - 80, 360).toDouble(); return PopupCard( elevation: 8, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), @@ -105,7 +105,10 @@ class AccountProfileCard extends HookConsumerWidget { FilledButton.tonalIcon( onPressed: () { Navigator.pop(context); - context.pushNamed('accountProfile', pathParameters: {'name': data.name}); + context.pushNamed( + 'accountProfile', + pathParameters: {'name': data.name}, + ); }, icon: const Icon(Symbols.launch), label: Text('accountProfileView').tr(), diff --git a/lib/widgets/chat/message_item.dart b/lib/widgets/chat/message_item.dart index 10ce7d8..8db2271 100644 --- a/lib/widgets/chat/message_item.dart +++ b/lib/widgets/chat/message_item.dart @@ -12,6 +12,7 @@ import 'package:island/models/chat.dart'; import 'package:island/models/embed.dart'; import 'package:island/pods/call.dart'; import 'package:island/screens/chat/room.dart'; +import 'package:island/widgets/account/account_name.dart'; import 'package:island/widgets/account/account_pfc.dart'; import 'package:island/widgets/app_scaffold.dart'; import 'package:island/widgets/content/cloud_file_collection.dart'; @@ -166,8 +167,8 @@ class MessageItem extends HookConsumerWidget { mainAxisSize: MainAxisSize.min, spacing: 5, children: [ - Text( - sender.account.nick, + AccountName( + account: sender.account, style: Theme.of(context).textTheme.bodySmall, ), Badge(