mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
chore: Archive button in main menu
This commit is contained in:
parent
29f8e05903
commit
da3dc8078d
@ -117,8 +117,8 @@ class FluffyRoutes {
|
||||
mainView: (_) => ChatList(), emptyView: (_) => EmptyPage());
|
||||
case 'archive':
|
||||
return ViewData(
|
||||
leftView: (_) => Settings(),
|
||||
mainView: (_) => Archive(),
|
||||
emptyView: (_) => EmptyPage(),
|
||||
);
|
||||
case 'logs':
|
||||
return ViewData(
|
||||
|
@ -20,7 +20,7 @@ import '../utils/url_launcher.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
enum SelectMode { normal, share, select }
|
||||
enum PopupMenuAction { settings, invite, newGroup, setStatus }
|
||||
enum PopupMenuAction { settings, invite, newGroup, setStatus, archive }
|
||||
|
||||
class ChatList extends StatefulWidget {
|
||||
final String activeChat;
|
||||
@ -285,6 +285,10 @@ class _ChatListState extends State<ChatList> {
|
||||
AdaptivePageLayout.of(context)
|
||||
.pushNamed('/newgroup');
|
||||
break;
|
||||
case PopupMenuAction.archive:
|
||||
AdaptivePageLayout.of(context)
|
||||
.pushNamed('/archive');
|
||||
break;
|
||||
}
|
||||
},
|
||||
itemBuilder: (_) => [
|
||||
@ -321,6 +325,17 @@ class _ChatListState extends State<ChatList> {
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: PopupMenuAction.archive,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.archive_outlined),
|
||||
SizedBox(width: 12),
|
||||
Text(L10n.of(context).archive),
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: PopupMenuAction.settings,
|
||||
child: Row(
|
||||
|
@ -468,11 +468,6 @@ class _SettingsState extends State<Settings> {
|
||||
AdaptivePageLayout.of(context).pushNamed('/settings/emotes'),
|
||||
trailing: Icon(Icons.insert_emoticon_outlined),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).archive),
|
||||
onTap: () => AdaptivePageLayout.of(context).pushNamed('/archive'),
|
||||
trailing: Icon(Icons.archive_outlined),
|
||||
),
|
||||
Divider(thickness: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
|
Loading…
Reference in New Issue
Block a user