Skip to content

Commit 638b7fc

Browse files
committed
feat(widgets): remove open settings from list app bar
Global actions are not allowed there.
1 parent ba51f34 commit 638b7fc

File tree

4 files changed

+0
-25
lines changed

4 files changed

+0
-25
lines changed

lib/features/forum/view/forum_page.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ class _ForumPageState extends State<ForumPage> with SingleTickerProviderStateMix
172172
await _threadScrollController.animateTo(0, curve: Curves.ease, duration: const Duration(milliseconds: 500));
173173
case MenuActions.reverseOrder:
174174
;
175-
case MenuActions.openSettings:
176-
await context.pushNamed(ScreenPaths.rootSettings);
177175
case MenuActions.debugViewLog:
178176
await context.pushNamed(ScreenPaths.debugLog);
179177
}

lib/features/home/widgets/widgets.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import 'package:tsdm_client/i18n/strings.g.dart';
66
import 'package:tsdm_client/routes/screen_paths.dart';
77

88
part 'home_navigation_bar.dart';
9-
109
part 'home_navigation_drawer.dart';
11-
1210
part 'home_navigation_rail.dart';
1311

1412
/// Bar item in app navigator.

lib/features/thread/v1/view/thread_page.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,6 @@ class _ThreadPageState extends State<ThreadPage> with SingleTickerProviderStateM
485485
);
486486
case MenuActions.reverseOrder:
487487
context.readOrNull<ThreadBloc>()?.add(const ThreadChangeViewOrderRequested());
488-
case MenuActions.openSettings:
489-
await context.pushNamed(ScreenPaths.rootSettings);
490488
case MenuActions.debugViewLog:
491489
await context.pushNamed(ScreenPaths.debugLog);
492490
}

lib/widgets/list_app_bar.dart

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'dart:async';
22

33
import 'package:flutter/material.dart';
44
import 'package:flutter_bloc/flutter_bloc.dart';
5-
import 'package:go_router/go_router.dart';
65
import 'package:tsdm_client/constants/layout.dart';
76
import 'package:tsdm_client/extensions/build_context.dart';
87
import 'package:tsdm_client/features/jump_page/cubit/jump_page_cubit.dart';
@@ -39,9 +38,6 @@ enum MenuActions {
3938
///
4039
/// View log.
4140
debugViewLog,
42-
43-
/// Open settings page.
44-
openSettings,
4541
}
4642

4743
/// A app bar contains list and provides features including:
@@ -143,11 +139,6 @@ class ListAppBar extends StatelessWidget implements PreferredSizeWidget {
143139
onPressed: onSearch,
144140
),
145141
const NoticeButton(),
146-
IconButton(
147-
icon: const Icon(Icons.settings_outlined),
148-
tooltip: context.t.general.openSettings,
149-
onPressed: () => context.pushNamed(ScreenPaths.rootSettings),
150-
),
151142
],
152143
),
153144
),
@@ -224,16 +215,6 @@ class ListAppBar extends StatelessWidget implements PreferredSizeWidget {
224215
],
225216
),
226217
),
227-
PopupMenuItem(
228-
value: MenuActions.openSettings,
229-
child: Row(
230-
children: [
231-
const Icon(Icons.settings_outlined),
232-
sizedBoxPopupMenuItemIconSpacing,
233-
Text(context.t.general.openSettings),
234-
],
235-
),
236-
),
237218
if (context.read<SettingsBloc>().state.settingsMap.enableDebugOperations) ...<PopupMenuEntry<MenuActions>>[
238219
const PopupMenuDivider(),
239220
PopupMenuItem(

0 commit comments

Comments
 (0)