From 737d3d1aefefbfff0df856c7822edb63b086485d Mon Sep 17 00:00:00 2001 From: kenny lopez Date: Mon, 3 Aug 2026 18:16:42 +0100 Subject: [PATCH] fix tablet inbox review findings Signed-off-by: kenny lopez --- .../lib/features/activity/activity_page.dart | 9 ++++--- .../lib/features/channels/channels_page.dart | 2 -- .../channels_page/wide_navigation.dart | 26 +++---------------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/mobile/lib/features/activity/activity_page.dart b/mobile/lib/features/activity/activity_page.dart index 1e7beec1f..535775019 100644 --- a/mobile/lib/features/activity/activity_page.dart +++ b/mobile/lib/features/activity/activity_page.dart @@ -121,6 +121,7 @@ class ActivityPage extends HookConsumerWidget { (item) => item.conversationId == selectedItemId.value, ); final retainsSelectedDetail = + unreadOnly.value && selectedItemForDetail.value?.conversationId == selectedItemId.value; if (!hasSelectedItem && !retainsSelectedDetail) { selectedItemId.value = visibleItems.first.conversationId; @@ -134,7 +135,7 @@ class ActivityPage extends HookConsumerWidget { (item) => item?.conversationId == selectedItemId.value, orElse: () => null, ) ?? - selectedItemForDetail.value; + (unreadOnly.value ? selectedItemForDetail.value : null); // Preload sender profiles for visible rows. final preloadPubkeys = { @@ -461,9 +462,11 @@ class _WideActivityDetail extends HookWidget { return const _WideActivityEmptyDetail(); } - final navigatorKey = useMemoized(GlobalKey.new, [item!.id]); + final navigatorKey = useMemoized(GlobalKey.new, [ + item!.conversationId, + ]); return NavigatorPopHandler( - key: ValueKey('wide-activity-detail-${item!.id}'), + key: ValueKey('wide-activity-detail-${item!.conversationId}'), onPopWithResult: (_) => navigatorKey.currentState?.maybePop(), child: Navigator( key: navigatorKey, diff --git a/mobile/lib/features/channels/channels_page.dart b/mobile/lib/features/channels/channels_page.dart index 8390b9509..1a2a637d4 100644 --- a/mobile/lib/features/channels/channels_page.dart +++ b/mobile/lib/features/channels/channels_page.dart @@ -27,8 +27,6 @@ import '../profile/profile_avatar.dart'; import '../profile/profile_provider.dart'; import '../profile/presence_cache_provider.dart'; import '../profile/user_cache_provider.dart'; -import '../profile/user_profile.dart'; -import '../profile/user_status_provider.dart'; import '../pairing/pairing_page.dart'; import '../pairing/pairing_provider.dart'; import 'channel.dart'; diff --git a/mobile/lib/features/channels/channels_page/wide_navigation.dart b/mobile/lib/features/channels/channels_page/wide_navigation.dart index d501b2585..a47f77fb0 100644 --- a/mobile/lib/features/channels/channels_page/wide_navigation.dart +++ b/mobile/lib/features/channels/channels_page/wide_navigation.dart @@ -608,17 +608,10 @@ class _WideNavigationProfile extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final palette = _wideSidebarPalette(context); final profile = ref.watch(profileProvider).value; - final status = ref.watch(userStatusProvider).asData?.value; final displayName = profile?.displayName?.trim(); final name = displayName != null && displayName.isNotEmpty ? displayName : 'You'; - final statusEmoji = status?.emoji ?? ''; - final statusText = status?.text.trim() ?? ''; - final statusLabel = [ - if (statusEmoji.isNotEmpty) statusEmoji, - if (statusText.isNotEmpty) statusText, - ].join(' '); return SizedBox( key: const Key('wide-navigation-profile'), @@ -659,17 +652,6 @@ class _WideNavigationProfile extends ConsumerWidget { fontWeight: FontWeight.w600, ), ), - if (statusLabel.isNotEmpty) ...[ - const SizedBox(height: Grid.quarter), - Text( - statusLabel, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: context.textTheme.labelSmall?.copyWith( - color: palette.mutedForeground, - ), - ), - ], ], ), ), @@ -701,7 +683,7 @@ class _WideNavigationProfile extends ConsumerWidget { class _WideChannelDestination extends StatelessWidget { final Channel channel; final String label; - final UserProfile? directMessageProfile; + final dynamic directMessageProfile; final bool selected; final VoidCallback onTap; @@ -876,7 +858,7 @@ class _WideNavigationDestination extends StatelessWidget { String _wideSidebarChannelLabel( Channel channel, { required String? currentPubkey, - required Map profiles, + required Map profiles, }) { if (!channel.isDm) return channel.displayLabel(); @@ -899,10 +881,10 @@ String _wideSidebarChannelLabel( return resolveDmChannelDisplayLabel(channel, currentPubkey: currentPubkey); } -UserProfile? _wideSidebarDirectMessageProfile( +dynamic _wideSidebarDirectMessageProfile( Channel channel, { required String? currentPubkey, - required Map profiles, + required Map profiles, }) { if (!channel.isDm) return null;