From f3eda1c89d7478751409b5e40933bf6b91a8459d Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 11 May 2020 18:27:00 +0200 Subject: [PATCH] Can open conversation in full screen --- .../conversations/conversation_window.dart | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart b/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart index ce54191..3ef3037 100644 --- a/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart +++ b/lib/ui/widgets/tablet_mode/conversations/conversation_window.dart @@ -17,7 +17,7 @@ import 'package:flutter/material.dart'; /// /// @author Pierre Hubert -enum _Actions { OPEN_MEMBERS, OPEN_SETTINGS } +enum _Actions { OPEN_FULL_SCREEN, OPEN_MEMBERS, OPEN_SETTINGS } class ConversationWindow extends StatefulWidget { final int convID; @@ -131,7 +131,11 @@ class _ConversationWindowState extends SafeState { ..addAll([ PopupMenuButton<_Actions>( itemBuilder: (c) => [ - // Start a new call + // Show in full screen + PopupMenuItem( + child: Text(tr("Open in full screen")), + value: _Actions.OPEN_FULL_SCREEN, + ), // Show the list of members PopupMenuItem( @@ -157,6 +161,10 @@ class _ConversationWindowState extends SafeState { void _menuCallback(_Actions value) { switch (value) { + case _Actions.OPEN_FULL_SCREEN: + _openFullScreen(); + break; + case _Actions.OPEN_MEMBERS: _openMembersList(); break; @@ -167,6 +175,11 @@ class _ConversationWindowState extends SafeState { } } + void _openFullScreen() { + MainController.of(context).openConversation(_convID, fullScreen: true); + widget.onClose(); + } + void _openMembersList() { showScreenDialog(context, ConversationMembersScreen(convID: _convID)); }