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

Remove useless conversation icon in tablet mode

This commit is contained in:
Pierre HUBERT 2021-04-25 16:20:23 +02:00
parent de7feb36ce
commit a07c7af715
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class ConversationImageWidget extends StatelessWidget {
final UsersList users;
final double size;
final Group group;
final bool noUserImage;
const ConversationImageWidget({
Key key,
@ -22,6 +23,7 @@ class ConversationImageWidget extends StatelessWidget {
@required this.users,
this.group,
this.size = 30,
this.noUserImage,
}) : assert(conversation != null),
assert(users != null),
assert(size > 0),
@ -30,6 +32,7 @@ class ConversationImageWidget extends StatelessWidget {
@override
Widget build(BuildContext context) => Material(
child: _buildIcon(),
color: Colors.transparent,
borderRadius: BorderRadius.all(
Radius.circular(18.0),
),
@ -50,6 +53,8 @@ class ConversationImageWidget extends StatelessWidget {
);
}
if (noUserImage == true) return Container(width: size);
if (conversation.members.length < 2)
return Icon(
Icons.lock,

View File

@ -222,6 +222,7 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
leading: ConversationImageWidget(
conversation: conversation,
users: _usersList,
noUserImage: conversation.isGroupConversation,
),
title: Row(
children: [