mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Can open conversation in full screen
This commit is contained in:
		@@ -17,7 +17,7 @@ import 'package:flutter/material.dart';
 | 
				
			|||||||
///
 | 
					///
 | 
				
			||||||
/// @author Pierre Hubert
 | 
					/// @author Pierre Hubert
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum _Actions { OPEN_MEMBERS, OPEN_SETTINGS }
 | 
					enum _Actions { OPEN_FULL_SCREEN, OPEN_MEMBERS, OPEN_SETTINGS }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ConversationWindow extends StatefulWidget {
 | 
					class ConversationWindow extends StatefulWidget {
 | 
				
			||||||
  final int convID;
 | 
					  final int convID;
 | 
				
			||||||
@@ -131,7 +131,11 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
 | 
				
			|||||||
        ..addAll(<Widget>[
 | 
					        ..addAll(<Widget>[
 | 
				
			||||||
          PopupMenuButton<_Actions>(
 | 
					          PopupMenuButton<_Actions>(
 | 
				
			||||||
            itemBuilder: (c) => [
 | 
					            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
 | 
					              // Show the list of members
 | 
				
			||||||
              PopupMenuItem(
 | 
					              PopupMenuItem(
 | 
				
			||||||
@@ -157,6 +161,10 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  void _menuCallback(_Actions value) {
 | 
					  void _menuCallback(_Actions value) {
 | 
				
			||||||
    switch (value) {
 | 
					    switch (value) {
 | 
				
			||||||
 | 
					      case _Actions.OPEN_FULL_SCREEN:
 | 
				
			||||||
 | 
					        _openFullScreen();
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      case _Actions.OPEN_MEMBERS:
 | 
					      case _Actions.OPEN_MEMBERS:
 | 
				
			||||||
        _openMembersList();
 | 
					        _openMembersList();
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
@@ -167,6 +175,11 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  void _openFullScreen() {
 | 
				
			||||||
 | 
					    MainController.of(context).openConversation(_convID, fullScreen: true);
 | 
				
			||||||
 | 
					    widget.onClose();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void _openMembersList() {
 | 
					  void _openMembersList() {
 | 
				
			||||||
    showScreenDialog(context, ConversationMembersScreen(convID: _convID));
 | 
					    showScreenDialog(context, ConversationMembersScreen(convID: _convID));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user