1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +00:00

Fix issue

This commit is contained in:
Pierre HUBERT 2021-04-07 16:35:18 +02:00
parent 662c4ab3eb
commit 4db2120de9
3 changed files with 13 additions and 3 deletions

View File

@ -154,11 +154,11 @@ abstract class MainController extends State<MainRoute> {
child: w, hideNavBar: hideNavBar, canShowAsDialog: canShowAsDialog)); child: w, hideNavBar: hideNavBar, canShowAsDialog: canShowAsDialog));
/// Open a conversation in its context (in group page for group conversations) /// Open a conversation in its context (in group page for group conversations)
void openConversation(Conversation conv) { void openConversation(Conversation conv, {fullScreen: false}) {
if (conv.isGroupConversation) if (conv.isGroupConversation)
openGroup(conv.groupID, conversationID: conv.id); openGroup(conv.groupID, conversationID: conv.id);
else else
openConversationById(conv.id); openConversationById(conv.id, fullScreen: fullScreen);
} }
/// Open a conversation /// Open a conversation

View File

@ -1,3 +1,4 @@
import 'package:comunic/models/conversation.dart';
import 'package:comunic/ui/dialogs/screen_dialog.dart'; import 'package:comunic/ui/dialogs/screen_dialog.dart';
import 'package:comunic/ui/routes/main_route/main_route.dart'; import 'package:comunic/ui/routes/main_route/main_route.dart';
import 'package:comunic/ui/routes/main_route/page_info.dart'; import 'package:comunic/ui/routes/main_route/page_info.dart';
@ -89,6 +90,14 @@ class _TabletRouteState extends MainController {
super.pushPage(page); super.pushPage(page);
} }
@override
void openConversation(Conversation conv, {fullScreen: false}) {
if (fullScreen)
super.openConversation(conv, fullScreen: fullScreen);
else
openConversationById(conv.id, fullScreen: false);
}
@override @override
void openConversationById(int convID, {fullScreen = false}) { void openConversationById(int convID, {fullScreen = false}) {
if (!fullScreen) { if (!fullScreen) {

View File

@ -238,7 +238,8 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
), ),
subtitle: Text(diffTimeFromNowToStr(membership.lastActive) + subtitle: Text(diffTimeFromNowToStr(membership.lastActive) +
(conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")), (conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")),
onTap: () => MainController.of(context).openConversation(conversation), onTap: () => MainController.of(context)
.openConversation(conversation, fullScreen: true),
trailing: conversation.isHavingCall trailing: conversation.isHavingCall
? FloatingActionButton( ? FloatingActionButton(
heroTag: null, heroTag: null,