File tree Expand file tree Collapse file tree 2 files changed +16
-21
lines changed
app/lib/features/geckoview/features/browser/presentation/widgets Expand file tree Collapse file tree 2 files changed +16
-21
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ import 'package:flutter/material.dart';
2121import 'package:flutter_material_design_icons/flutter_material_design_icons.dart' ;
2222import 'package:hooks_riverpod/hooks_riverpod.dart' ;
2323import 'package:weblibre/core/routing/routes.dart' ;
24- import 'package:weblibre/features/geckoview/domain/repositories/tab.dart' ;
2524import 'package:weblibre/features/user/domain/repositories/general_settings.dart' ;
26- import 'package:weblibre/utils/ui_helper.dart' as ui_helper;
2725
2826class TabCreationMenu extends HookConsumerWidget {
2927 final Widget child;
@@ -51,25 +49,6 @@ class TabCreationMenu extends HookConsumerWidget {
5149 return child! ;
5250 },
5351 menuChildren: [
54- if (selectedTabId != null ) ...[
55- MenuItemButton (
56- onPressed: () async {
57- await ref
58- .read (tabRepositoryProvider.notifier)
59- .closeTab (selectedTabId! );
60-
61- if (context.mounted) {
62- ui_helper.showTabUndoClose (
63- context,
64- ref.read (tabRepositoryProvider.notifier).undoClose,
65- );
66- }
67- },
68- leadingIcon: const Icon (Icons .close),
69- child: const Text ('Close Tab' ),
70- ),
71- const Divider (),
72- ],
7352 MenuItemButton (
7453 onPressed: () async {
7554 await const SearchRoute (tabType: TabType .regular).push (context);
Original file line number Diff line number Diff line change @@ -128,6 +128,22 @@ class TabMenu extends HookConsumerWidget {
128128 },
129129 ),
130130 const Divider (),
131+ MenuItemButton (
132+ onPressed: () async {
133+ await ref
134+ .read (tabRepositoryProvider.notifier)
135+ .closeTab (selectedTabId);
136+
137+ if (context.mounted) {
138+ ui_helper.showTabUndoClose (
139+ context,
140+ ref.read (tabRepositoryProvider.notifier).undoClose,
141+ );
142+ }
143+ },
144+ leadingIcon: const Icon (Icons .close),
145+ child: const Text ('Close Tab' ),
146+ ),
131147 MenuItemButton (
132148 leadingIcon: const Icon (MdiIcons .contentCopy),
133149 child: const Text ('Copy address' ),
You can’t perform that action at this time.
0 commit comments