mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
Deactivate old settings page
This commit is contained in:
parent
78ffc38534
commit
f7bf69fbfd
@ -1,6 +1,5 @@
|
|||||||
import 'package:comunic/helpers/account_helper.dart';
|
import 'package:comunic/helpers/account_helper.dart';
|
||||||
import 'package:comunic/ui/routes/account_settings/account_settings_route.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/conversation_route.dart';
|
||||||
import 'package:comunic/ui/routes/login_route.dart';
|
import 'package:comunic/ui/routes/login_route.dart';
|
||||||
import 'package:comunic/ui/routes/main_route/page_info.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) =>
|
void startCall(int convID) =>
|
||||||
pushPage(PageInfo(child: CallScreen(convID: convID), hideNavBar: true));
|
pushPage(PageInfo(child: CallScreen(convID: convID), hideNavBar: true));
|
||||||
|
|
||||||
/// Open account settings
|
/// Open settings
|
||||||
void openAccountSettings() => Navigator.of(context)
|
void openSettings() => Navigator.of(context)
|
||||||
.push(MaterialPageRoute(builder: (c) => AccountSettingsRoute()));
|
.push(MaterialPageRoute(builder: (c) => AccountSettingsRoute()));
|
||||||
|
|
||||||
/// Open application settings
|
|
||||||
void openAppSettings() => Navigator.of(context)
|
|
||||||
.push(MaterialPageRoute(builder: (c) => AppSettingsRoute()));
|
|
||||||
|
|
||||||
/// Handle logout requests
|
/// Handle logout requests
|
||||||
void requestLogout() async {
|
void requestLogout() async {
|
||||||
if (!await showConfirmDialog(
|
if (!await showConfirmDialog(
|
||||||
|
@ -23,8 +23,7 @@ enum BarCallbackActions {
|
|||||||
OPEN_MY_PAGE,
|
OPEN_MY_PAGE,
|
||||||
OPEN_SEARCH_PAGE,
|
OPEN_SEARCH_PAGE,
|
||||||
OPEN_GROUPS,
|
OPEN_GROUPS,
|
||||||
OPEN_ACCOUNT_SETTINGS,
|
OPEN_SETTINGS,
|
||||||
OPEN_APP_SETTINGS,
|
|
||||||
ACTION_LOGOUT
|
ACTION_LOGOUT
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,10 +100,7 @@ final _menuActionsItem = <_ActionMenuItem>[
|
|||||||
_ActionMenuItem(
|
_ActionMenuItem(
|
||||||
label: tr("Search"), action: BarCallbackActions.OPEN_SEARCH_PAGE),
|
label: tr("Search"), action: BarCallbackActions.OPEN_SEARCH_PAGE),
|
||||||
_ActionMenuItem(
|
_ActionMenuItem(
|
||||||
label: tr("Account settings"),
|
label: tr("Settings"), action: BarCallbackActions.OPEN_SETTINGS),
|
||||||
action: BarCallbackActions.OPEN_ACCOUNT_SETTINGS),
|
|
||||||
_ActionMenuItem(
|
|
||||||
label: tr("App settings"), action: BarCallbackActions.OPEN_APP_SETTINGS),
|
|
||||||
_ActionMenuItem(
|
_ActionMenuItem(
|
||||||
label: tr("Sign out"), action: BarCallbackActions.ACTION_LOGOUT),
|
label: tr("Sign out"), action: BarCallbackActions.ACTION_LOGOUT),
|
||||||
];
|
];
|
||||||
@ -215,11 +211,8 @@ class _ComunicMobileAppBarState extends SafeState<ComunicMobileAppBar> {
|
|||||||
case BarCallbackActions.OPEN_GROUPS:
|
case BarCallbackActions.OPEN_GROUPS:
|
||||||
controller.openGroupsListPage();
|
controller.openGroupsListPage();
|
||||||
break;
|
break;
|
||||||
case BarCallbackActions.OPEN_ACCOUNT_SETTINGS:
|
case BarCallbackActions.OPEN_SETTINGS:
|
||||||
controller.openAccountSettings();
|
controller.openSettings();
|
||||||
break;
|
|
||||||
case BarCallbackActions.OPEN_APP_SETTINGS:
|
|
||||||
controller.openAppSettings();
|
|
||||||
break;
|
break;
|
||||||
case BarCallbackActions.ACTION_LOGOUT:
|
case BarCallbackActions.ACTION_LOGOUT:
|
||||||
controller.requestLogout();
|
controller.requestLogout();
|
||||||
|
Loading…
Reference in New Issue
Block a user