diff --git a/lib/ui/routes/main_route/main_route.dart b/lib/ui/routes/main_route/main_route.dart index e57ebb8..b8b241c 100644 --- a/lib/ui/routes/main_route/main_route.dart +++ b/lib/ui/routes/main_route/main_route.dart @@ -154,11 +154,11 @@ abstract class MainController extends State { child: w, hideNavBar: hideNavBar, canShowAsDialog: canShowAsDialog)); /// 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) openGroup(conv.groupID, conversationID: conv.id); else - openConversationById(conv.id); + openConversationById(conv.id, fullScreen: fullScreen); } /// Open a conversation diff --git a/lib/ui/routes/main_route/tablet_route.dart b/lib/ui/routes/main_route/tablet_route.dart index 45c94ac..f285370 100644 --- a/lib/ui/routes/main_route/tablet_route.dart +++ b/lib/ui/routes/main_route/tablet_route.dart @@ -1,3 +1,4 @@ +import 'package:comunic/models/conversation.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/page_info.dart'; @@ -89,6 +90,14 @@ class _TabletRouteState extends MainController { super.pushPage(page); } + @override + void openConversation(Conversation conv, {fullScreen: false}) { + if (fullScreen) + super.openConversation(conv, fullScreen: fullScreen); + else + openConversationById(conv.id, fullScreen: false); + } + @override void openConversationById(int convID, {fullScreen = false}) { if (!fullScreen) { diff --git a/lib/ui/widgets/tablet_mode/memberships_panel.dart b/lib/ui/widgets/tablet_mode/memberships_panel.dart index 32edff6..a1783e6 100644 --- a/lib/ui/widgets/tablet_mode/memberships_panel.dart +++ b/lib/ui/widgets/tablet_mode/memberships_panel.dart @@ -238,7 +238,8 @@ class _MembershipsPanelState extends SafeState { ), subtitle: Text(diffTimeFromNowToStr(membership.lastActive) + (conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")), - onTap: () => MainController.of(context).openConversation(conversation), + onTap: () => MainController.of(context) + .openConversation(conversation, fullScreen: true), trailing: conversation.isHavingCall ? FloatingActionButton( heroTag: null,