1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +00:00

Add calls notice

This commit is contained in:
Pierre HUBERT 2020-05-06 18:05:02 +02:00
parent 0103779608
commit 6961694fd2

View File

@ -157,16 +157,19 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
); );
} }
/// TODO : all calls notices
Widget _buildConversationMembership(Membership membership) { Widget _buildConversationMembership(Membership membership) {
final conversation = membership.conversation;
return Container( return Container(
color: membership.conversation.sawLastMessage ? null : Color(0xFF1c443a), color: conversation.isHavingCall
? Color(0xFF815d1d)
: (conversation.sawLastMessage ? null : Color(0xFF1c443a)),
child: ListTile( child: ListTile(
dense: true, dense: true,
leading: Icon(Icons.message), leading: Icon(conversation.isHavingCall ? Icons.phone : Icons.message),
title: Text(ConversationsHelper.getConversationName( title: Text(
membership.conversation, _usersList)), ConversationsHelper.getConversationName(conversation, _usersList)),
subtitle: Text(diffTimeFromNowToStr(membership.lastActive)), subtitle: Text(diffTimeFromNowToStr(membership.lastActive) +
(conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")),
), ),
); );
} }