diff --git a/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart b/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart index b7ff768..cf16a6c 100644 --- a/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart +++ b/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart @@ -2,6 +2,7 @@ import 'package:comunic/helpers/conversations_helper.dart'; import 'package:comunic/helpers/events_helper.dart'; import 'package:comunic/models/conversation.dart'; import 'package:comunic/ui/dialogs/screen_dialog.dart'; +import 'package:comunic/ui/routes/update_conversation_route.dart'; import 'package:comunic/ui/screens/conversation_members_screen.dart'; import 'package:comunic/ui/screens/conversation_screen.dart'; import 'package:comunic/ui/widgets/safe_state.dart'; @@ -15,7 +16,7 @@ import 'package:flutter/material.dart'; /// /// @author Pierre Hubert -enum _Actions { OPEN_MEMBERS } +enum _Actions { OPEN_MEMBERS, OPEN_SETTINGS } class ConversationWindow extends StatefulWidget { final int convID; @@ -130,6 +131,12 @@ class _ConversationWindowState extends SafeState { PopupMenuItem( child: Text(tr("Members")), value: _Actions.OPEN_MEMBERS, + ), + + // Show conversation settings + PopupMenuItem( + child: Text(tr("Settings")), + value: _Actions.OPEN_SETTINGS, ) ], onSelected: _menuCallback, @@ -147,10 +154,20 @@ class _ConversationWindowState extends SafeState { case _Actions.OPEN_MEMBERS: _openMembersList(); break; + + case _Actions.OPEN_SETTINGS: + _openConversationSettings(); + break; } } void _openMembersList() { showScreenDialog(context, ConversationMembersScreen(convID: _convID)); } + + void _openConversationSettings() async { + await showScreenDialog( + context, UpdateConversationRoute(conversationID: _convID)); + _refresh(); + } }