diff --git a/lib/ui/routes/main_route/main_route.dart b/lib/ui/routes/main_route/main_route.dart index 3cfd891..9014569 100644 --- a/lib/ui/routes/main_route/main_route.dart +++ b/lib/ui/routes/main_route/main_route.dart @@ -126,6 +126,7 @@ abstract class MainController extends State { /// Open a conversation void openConversation(int convID, {fullScreen: false}) => pushPage(PageInfo( type: PageType.CONVERSATION_PAGE, + id: convID, child: ConversationRoute(conversationID: convID), hideNavBar: true, )); diff --git a/lib/ui/widgets/tablet_mode/memberships_panel.dart b/lib/ui/widgets/tablet_mode/memberships_panel.dart index 27c4236..3814a4a 100644 --- a/lib/ui/widgets/tablet_mode/memberships_panel.dart +++ b/lib/ui/widgets/tablet_mode/memberships_panel.dart @@ -184,10 +184,17 @@ class _MembershipsPanelState extends SafeState { Widget _buildConversationMembership(Membership membership) { final conversation = membership.conversation; + + Color color; + if (conversation.isHavingCall) + color = Color(0xFF815d1d); + else if (widget.currentPage.type == PageType.CONVERSATION_PAGE && + widget.currentPage.id == conversation.id) + color = Colors.grey.shade800; + else if (!conversation.sawLastMessage) color = Color(0xFF1c443a); + return Container( - color: conversation.isHavingCall - ? Color(0xFF815d1d) - : (conversation.sawLastMessage ? null : Color(0xFF1c443a)), + color: color, child: ListTile( dense: true, leading: Icon(Icons.message), @@ -195,8 +202,8 @@ class _MembershipsPanelState extends SafeState { ConversationsHelper.getConversationName(conversation, _usersList)), subtitle: Text(diffTimeFromNowToStr(membership.lastActive) + (conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")), - onTap: () => - MainController.of(context).openConversation(conversation.id), + onTap: () => MainController.of(context) + .openConversation(conversation.id, fullScreen: true), trailing: conversation.isHavingCall ? FloatingActionButton( child: Icon(Icons.call),