1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-25 04:18:51 +00:00

Improve call membership tile

This commit is contained in:
Pierre HUBERT 2020-05-09 20:19:16 +02:00
parent 25222e9156
commit 63a8e61e80

View File

@ -167,13 +167,20 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
: (conversation.sawLastMessage ? null : Color(0xFF1c443a)),
child: ListTile(
dense: true,
leading: Icon(conversation.isHavingCall ? Icons.phone : Icons.message),
leading: Icon(Icons.message),
title: Text(
ConversationsHelper.getConversationName(conversation, _usersList)),
subtitle: Text(diffTimeFromNowToStr(membership.lastActive) +
(conversation.isHavingCall ? "\n" + tr("Ongoing call") : "")),
onTap: () =>
MainController.of(context).openConversation(conversation.id),
trailing: conversation.isHavingCall
? FloatingActionButton(
child: Icon(Icons.call),
onPressed: () =>
MainController.of(context).startCall(conversation.id),
)
: null,
),
);
}