1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-24 11:58:51 +00:00

Deactivate old settings page

This commit is contained in:
Pierre HUBERT 2020-05-12 18:40:07 +02:00
parent 78ffc38534
commit f7bf69fbfd
2 changed files with 6 additions and 18 deletions

View File

@ -1,6 +1,5 @@
import 'package:comunic/helpers/account_helper.dart';
import 'package:comunic/ui/routes/account_settings/account_settings_route.dart';
import 'package:comunic/ui/routes/app_settings_route.dart';
import 'package:comunic/ui/routes/conversation_route.dart';
import 'package:comunic/ui/routes/login_route.dart';
import 'package:comunic/ui/routes/main_route/page_info.dart';
@ -144,14 +143,10 @@ abstract class MainController extends State<MainRoute> {
void startCall(int convID) =>
pushPage(PageInfo(child: CallScreen(convID: convID), hideNavBar: true));
/// Open account settings
void openAccountSettings() => Navigator.of(context)
/// Open settings
void openSettings() => Navigator.of(context)
.push(MaterialPageRoute(builder: (c) => AccountSettingsRoute()));
/// Open application settings
void openAppSettings() => Navigator.of(context)
.push(MaterialPageRoute(builder: (c) => AppSettingsRoute()));
/// Handle logout requests
void requestLogout() async {
if (!await showConfirmDialog(

View File

@ -23,8 +23,7 @@ enum BarCallbackActions {
OPEN_MY_PAGE,
OPEN_SEARCH_PAGE,
OPEN_GROUPS,
OPEN_ACCOUNT_SETTINGS,
OPEN_APP_SETTINGS,
OPEN_SETTINGS,
ACTION_LOGOUT
}
@ -101,10 +100,7 @@ final _menuActionsItem = <_ActionMenuItem>[
_ActionMenuItem(
label: tr("Search"), action: BarCallbackActions.OPEN_SEARCH_PAGE),
_ActionMenuItem(
label: tr("Account settings"),
action: BarCallbackActions.OPEN_ACCOUNT_SETTINGS),
_ActionMenuItem(
label: tr("App settings"), action: BarCallbackActions.OPEN_APP_SETTINGS),
label: tr("Settings"), action: BarCallbackActions.OPEN_SETTINGS),
_ActionMenuItem(
label: tr("Sign out"), action: BarCallbackActions.ACTION_LOGOUT),
];
@ -215,11 +211,8 @@ class _ComunicMobileAppBarState extends SafeState<ComunicMobileAppBar> {
case BarCallbackActions.OPEN_GROUPS:
controller.openGroupsListPage();
break;
case BarCallbackActions.OPEN_ACCOUNT_SETTINGS:
controller.openAccountSettings();
break;
case BarCallbackActions.OPEN_APP_SETTINGS:
controller.openAppSettings();
case BarCallbackActions.OPEN_SETTINGS:
controller.openSettings();
break;
case BarCallbackActions.ACTION_LOGOUT:
controller.requestLogout();