mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +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
 | 
			
		||||
 | 
			
		||||
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<ConversationWindow> {
 | 
			
		||||
        ..addAll(<Widget>[
 | 
			
		||||
          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<ConversationWindow> {
 | 
			
		||||
 | 
			
		||||
  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<ConversationWindow> {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void _openFullScreen() {
 | 
			
		||||
    MainController.of(context).openConversation(_convID, fullScreen: true);
 | 
			
		||||
    widget.onClose();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void _openMembersList() {
 | 
			
		||||
    showScreenDialog(context, ConversationMembersScreen(convID: _convID));
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user