1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 12:58:51 +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) {
final conversation = membership.conversation;
return Container(
color: membership.conversation.sawLastMessage ? null : Color(0xFF1c443a),
color: conversation.isHavingCall
? Color(0xFF815d1d)
: (conversation.sawLastMessage ? null : Color(0xFF1c443a)),
child: ListTile(
dense: true,
leading: Icon(Icons.message),
title: Text(ConversationsHelper.getConversationName(
membership.conversation, _usersList)),
subtitle: Text(diffTimeFromNowToStr(membership.lastActive)),
leading: Icon(conversation.isHavingCall ? Icons.phone : Icons.message),
title: Text(
ConversationsHelper.getConversationName(conversation, _usersList)),
subtitle: Text(diffTimeFromNowToStr(membership.lastActive) +
(conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")),
),
);
}