From 9974e9b9f1de07e8396d1ba26ea2f1b5d36f6446 Mon Sep 17 00:00:00 2001 From: kenny lopez Date: Mon, 3 Aug 2026 17:20:30 +0100 Subject: [PATCH] fix tablet inbox review feedback Signed-off-by: kenny lopez --- mobile/lib/features/activity/activity_page.dart | 10 +++++----- .../channels/channels_page/wide_navigation.dart | 3 +++ mobile/lib/features/channels/channels_provider.dart | 2 -- mobile/lib/features/home/home_page.dart | 5 ++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mobile/lib/features/activity/activity_page.dart b/mobile/lib/features/activity/activity_page.dart index 824230ea1..0d634ee22 100644 --- a/mobile/lib/features/activity/activity_page.dart +++ b/mobile/lib/features/activity/activity_page.dart @@ -118,12 +118,12 @@ class ActivityPage extends HookConsumerWidget { useEffect(() { if (!isWideInbox || visibleItems.isEmpty) return null; final hasSelectedItem = visibleItems.any( - (item) => item.id == selectedItemId.value, + (item) => item.conversationId == selectedItemId.value, ); final retainsSelectedDetail = - selectedItemForDetail.value?.id == selectedItemId.value; + selectedItemForDetail.value?.conversationId == selectedItemId.value; if (!hasSelectedItem && !retainsSelectedDetail) { - selectedItemId.value = visibleItems.first.id; + selectedItemId.value = visibleItems.first.conversationId; selectedItemTarget.value = null; selectedItemForDetail.value = null; } @@ -131,7 +131,7 @@ class ActivityPage extends HookConsumerWidget { }, [isWideInbox, visibleItemIdsKey, filter.value, unreadOnly.value]); final selectedItem = visibleItems.cast().firstWhere( - (item) => item?.id == selectedItemId.value, + (item) => item?.conversationId == selectedItemId.value, orElse: () => null, ) ?? selectedItemForDetail.value; @@ -213,7 +213,7 @@ class ActivityPage extends HookConsumerWidget { : thread.parentId; if (isWideInbox) { - selectedItemId.value = item.id; + selectedItemId.value = item.conversationId; selectedItemTarget.value = target; selectedItemForDetail.value = item; markItemRead(item); diff --git a/mobile/lib/features/channels/channels_page/wide_navigation.dart b/mobile/lib/features/channels/channels_page/wide_navigation.dart index 4efa30ea9..a2d5da120 100644 --- a/mobile/lib/features/channels/channels_page/wide_navigation.dart +++ b/mobile/lib/features/channels/channels_page/wide_navigation.dart @@ -11,6 +11,7 @@ const _wideNavigationIdentityAvatarInset = Grid.xs + Grid.half - (Grid.quarter / 2); const _wideNavigationIdentityLabelGap = Grid.half + (Grid.quarter / 2); +/// A top-level tablet workspace destination supplied by the Home shell. class WideNavigationDestination { final IconData icon; final IconData selectedIcon; @@ -23,6 +24,7 @@ class WideNavigationDestination { }); } +/// Tablet channel sidebar that owns channel/profile presentation and callbacks. class WideChannelsNavigation extends HookConsumerWidget { final int? selectedIndex; final ValueChanged onDestinationSelected; @@ -792,6 +794,7 @@ class _WideChannelDestination extends StatelessWidget { } } +/// Nested tablet channel detail surface resolved from a selected channel ID. class WideChannelContent extends HookConsumerWidget { final String channelId; final VoidCallback onChannelLeft; diff --git a/mobile/lib/features/channels/channels_provider.dart b/mobile/lib/features/channels/channels_provider.dart index c7418c0cf..48cf08826 100644 --- a/mobile/lib/features/channels/channels_provider.dart +++ b/mobile/lib/features/channels/channels_provider.dart @@ -48,7 +48,6 @@ class ChannelsNotifier extends AsyncNotifier> { Set _participatedRootIds = {}; Set _authoredRootIds = {}; String? _threadInterestPubkey; - bool _hasLoaded = false; Map get latestObservedByChannel => Map.unmodifiable(_latestObservedByChannel); @@ -110,7 +109,6 @@ class ChannelsNotifier extends AsyncNotifier> { subscribeLive: subscribeLive, fetchLastMessage: fetchLastMessage, ); - _hasLoaded = true; return channels; } diff --git a/mobile/lib/features/home/home_page.dart b/mobile/lib/features/home/home_page.dart index 9e896364c..b6974d506 100644 --- a/mobile/lib/features/home/home_page.dart +++ b/mobile/lib/features/home/home_page.dart @@ -35,7 +35,6 @@ class HomePage extends HookConsumerWidget { static const Duration _tabIconWeightDuration = Duration(milliseconds: 120); static const double _wideNavigationBreakpoint = 840; static const double _wideContentInset = Grid.half + Grid.quarter; - static const double _wideContentRadius = 24; static const _destinations = [ WideNavigationDestination( @@ -191,7 +190,7 @@ class HomePage extends HookConsumerWidget { decoration: BoxDecoration( color: context.colors.surface, borderRadius: BorderRadius.circular( - HomePage._wideContentRadius, + Radii.dialog, ), // Matches desktop's Buzz content surface: a // hairline on the upper-left edge plus a very @@ -215,7 +214,7 @@ class HomePage extends HookConsumerWidget { ), child: ClipRRect( borderRadius: BorderRadius.circular( - HomePage._wideContentRadius, + Radii.dialog, ), child: MediaQuery( // The desktop-like canvas is inset below the