1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00

Move "About Comunic" dialog

This commit is contained in:
Pierre HUBERT 2020-05-03 17:00:38 +02:00
parent 11c25ea271
commit e00f452b98
3 changed files with 24 additions and 28 deletions

View File

@ -1,5 +1,6 @@
import 'package:comunic/helpers/preferences_helper.dart'; import 'package:comunic/helpers/preferences_helper.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Application settings route /// Application settings route
@ -61,6 +62,10 @@ class __AppSettingsBodyState extends State<_AppSettingsBody> {
description: description:
tr("You will need to restart the application to apply changes"), tr("You will need to restart the application to apply changes"),
), ),
ListTile(
title: Text(tr("About Comunic")),
onTap: () => showAboutAppDialog(context),
),
], ],
), ),
); );

View File

@ -126,11 +126,6 @@ class _MainRouteState extends MainController {
_openAccountsSettings(); _openAccountsSettings();
break; break;
/// Show about dialog
case BarCallbackActions.OPEN_ABOUT_DIALOG:
showAboutAppDialog(context);
break;
/// Logout user /// Logout user
case BarCallbackActions.ACTION_LOGOUT: case BarCallbackActions.ACTION_LOGOUT:
_logoutRequested(); _logoutRequested();

View File

@ -28,7 +28,6 @@ enum BarCallbackActions {
OPEN_ACCOUNT_SETTINGS, OPEN_ACCOUNT_SETTINGS,
OPEN_APP_SETTINGS, OPEN_APP_SETTINGS,
OPEN_USER_FRIENDS_LIST, OPEN_USER_FRIENDS_LIST,
OPEN_ABOUT_DIALOG,
OPEN_CONVERSATION, OPEN_CONVERSATION,
NONE, NONE,
ACTION_LOGOUT ACTION_LOGOUT
@ -103,8 +102,6 @@ final _menuActionsItem = <_ActionMenuItem>[
action: BarCallbackActions.OPEN_ACCOUNT_SETTINGS), action: BarCallbackActions.OPEN_ACCOUNT_SETTINGS),
_ActionMenuItem( _ActionMenuItem(
label: tr("App settings"), action: BarCallbackActions.OPEN_APP_SETTINGS), label: tr("App settings"), action: BarCallbackActions.OPEN_APP_SETTINGS),
_ActionMenuItem(
label: tr("About Comunic"), action: BarCallbackActions.OPEN_ABOUT_DIALOG),
_ActionMenuItem( _ActionMenuItem(
label: tr("Sign out"), action: BarCallbackActions.ACTION_LOGOUT), label: tr("Sign out"), action: BarCallbackActions.ACTION_LOGOUT),
]; ];
@ -179,8 +176,7 @@ class _ComunicAppBarState extends SafeState<ComunicAppBar> {
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: List.generate( children: List.generate(
_menuItems.length, _menuItems.length,
(i) => (i) => _MenuItemWidget(
_MenuItemWidget(
item: _menuItems[i], item: _menuItems[i],
onTap: widget.onTap, onTap: widget.onTap,
isSelected: _menuItems[i].action == widget.selectedAction, isSelected: _menuItems[i].action == widget.selectedAction,