mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Highlight active conversation
This commit is contained in:
		@@ -184,10 +184,17 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
 | 
			
		||||
 | 
			
		||||
  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<MembershipsPanel> {
 | 
			
		||||
            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),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user