From e656591527b60407e7f564dda1e7ea18b4c95f4b Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 23 May 2025 00:05:49 +0800 Subject: [PATCH] :bug: Bug fixes --- lib/screens/account.dart | 6 ++++-- lib/screens/chat/chat.dart | 7 +++++-- lib/screens/creators/hub.dart | 1 + lib/screens/realm/realms.dart | 8 +++++++- lib/screens/wallet.dart | 22 +++++++++++++--------- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/lib/screens/account.dart b/lib/screens/account.dart index 27dd321..06a0843 100644 --- a/lib/screens/account.dart +++ b/lib/screens/account.dart @@ -113,7 +113,9 @@ class AccountScreen extends HookConsumerWidget { ], ), Text( - user.value!.profile.bio ?? 'No description yet.', + (user.value!.profile.bio.isNotEmpty) + ? user.value!.profile.bio + : 'No description yet.', maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -146,7 +148,7 @@ class AccountScreen extends HookConsumerWidget { ], ).padding(horizontal: 16, vertical: 12), onTap: () { - context.router.push(CreatorHubRoute()); + context.router.push(CreatorHubShellRoute()); }, ), ).height(140), diff --git a/lib/screens/chat/chat.dart b/lib/screens/chat/chat.dart index 7c4a4fe..0fbf97d 100644 --- a/lib/screens/chat/chat.dart +++ b/lib/screens/chat/chat.dart @@ -68,8 +68,11 @@ class ChatRoomListTile extends StatelessWidget { subtitle != null ? subtitle! : (isDirect && room.description == null) - ? Text(room.members!.map((e) => '@${e.account.name}').join(', ')) - : Text(room.description ?? 'descriptionNone'.tr()), + ? Text( + room.members!.map((e) => '@${e.account.name}').join(', '), + maxLines: 1, + ) + : Text(room.description ?? 'descriptionNone'.tr(), maxLines: 1), trailing: trailing, onTap: onTap, ); diff --git a/lib/screens/creators/hub.dart b/lib/screens/creators/hub.dart index c026464..41a3238 100644 --- a/lib/screens/creators/hub.dart +++ b/lib/screens/creators/hub.dart @@ -124,6 +124,7 @@ class CreatorHubScreen extends HookConsumerWidget { return AppScaffold( appBar: AppBar( + leading: !isWide ? const PageBackButton() : null, title: Text('creatorHub').tr(), actions: [ DropdownButtonHideUnderline( diff --git a/lib/screens/realm/realms.dart b/lib/screens/realm/realms.dart index 8dd5418..7c65eb4 100644 --- a/lib/screens/realm/realms.dart +++ b/lib/screens/realm/realms.dart @@ -94,6 +94,7 @@ class RealmListScreen extends HookConsumerWidget { itemCount: value.length, itemBuilder: (context, item) { return ListTile( + isThreeLine: true, leading: ProfilePictureWidget( fileId: value[item].pictureId, fallbackIcon: Symbols.group, @@ -105,7 +106,12 @@ class RealmListScreen extends HookConsumerWidget { RealmDetailRoute(slug: value[item].slug), ); }, - contentPadding: EdgeInsets.only(left: 16, right: 14), + contentPadding: EdgeInsets.only( + left: 16, + right: 14, + top: 8, + bottom: 8, + ), ); }, ), diff --git a/lib/screens/wallet.dart b/lib/screens/wallet.dart index 27a8427..c8213cc 100644 --- a/lib/screens/wallet.dart +++ b/lib/screens/wallet.dart @@ -99,15 +99,19 @@ class WalletScreen extends HookConsumerWidget { body: wallet.when( data: (data) { if (data == null) { - return Column( - children: [ - Text('walletNotFound').tr(), - Text('walletCreateHint').tr(), - TextButton( - onPressed: createWallet, - child: Text('walletCreate').tr(), - ), - ], + return ConstrainedBox( + constraints: BoxConstraints(maxWidth: 280), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('walletNotFound').tr().fontSize(16).bold(), + Text('walletCreateHint', textAlign: TextAlign.center).tr(), + TextButton( + onPressed: createWallet, + child: Text('walletCreate').tr(), + ), + ], + ), ); }