Make top-right overflow menus consistent across main views
Reorder the Channels overflow menu so screen-specific items appear above a divider followed by Connect/Disconnect and Settings, matching Contacts. Add the section divider on Map whenever screen items precede Connect/Disconnect, standardize the overflow tooltip and screen-context callback capture across all three main views via a shared trailing-section helper, and update the UI design reference and widget tests.
This commit is contained in:
1 parent
2f8fcb87d7
commit
cf4b21ef02
6 files changed
+613
-66
No files matched your search
@@ -39,9 +39,7 @@ import 'channel_chat_screen.dart';
|
||||
import 'community_qr_scanner_screen.dart';
|
||||
import 'contacts_screen.dart';
|
||||
import 'map_screen.dart';
|
||||
import 'settings_screen.dart';
|
||||
import '../review_mode/review_mode_banner.dart';
|
||||
import '../theme/theme_icons.dart';
|
||||
|
||||
class ChannelsScreen extends StatefulWidget {
|
||||
final bool hideBackButton;
|
||||
@@ -124,11 +122,11 @@ class _ChannelsScreenState extends State<ChannelsScreen> {
|
||||
bottom: const SyncProgressAppBarBottom(),
|
||||
actions: [
|
||||
PopupMenuButton(
|
||||
tooltip: context.l10n.contacts_moreOptions,
|
||||
// onTap handlers run after the menu route pops, so they must
|
||||
// capture the screen's context — not the itemBuilder's menu
|
||||
// context, which is deactivated by then.
|
||||
itemBuilder: (menuContext) => [
|
||||
connectionMenuItem(context, menuContext),
|
||||
PopupMenuItem(
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.bookmark_border,
|
||||
@@ -146,18 +144,7 @@ class _ChannelsScreenState extends State<ChannelsScreen> {
|
||||
),
|
||||
onTap: () => _showManageCommunitiesDialog(context),
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: MeshMenuItemRow(
|
||||
leading: const ThemedIcon(ThemeIconSlot.settings, size: 20),
|
||||
label: menuContext.l10n.settings_title,
|
||||
),
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const SettingsScreen(),
|
||||
),
|
||||
),
|
||||
),
|
||||
...mainOverflowTrailingItems(context, menuContext),
|
||||
],
|
||||
icon: const Icon(Icons.more_vert),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user