1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +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 UsersList users;
final double size; final double size;
final Group group; final Group group;
final bool noUserImage;
const ConversationImageWidget({ const ConversationImageWidget({
Key key, Key key,
@ -22,6 +23,7 @@ class ConversationImageWidget extends StatelessWidget {
@required this.users, @required this.users,
this.group, this.group,
this.size = 30, this.size = 30,
this.noUserImage,
}) : assert(conversation != null), }) : assert(conversation != null),
assert(users != null), assert(users != null),
assert(size > 0), assert(size > 0),
@ -30,6 +32,7 @@ class ConversationImageWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) => Material( Widget build(BuildContext context) => Material(
child: _buildIcon(), child: _buildIcon(),
color: Colors.transparent,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(18.0), Radius.circular(18.0),
), ),
@ -50,6 +53,8 @@ class ConversationImageWidget extends StatelessWidget {
); );
} }
if (noUserImage == true) return Container(width: size);
if (conversation.members.length < 2) if (conversation.members.length < 2)
return Icon( return Icon(
Icons.lock, Icons.lock,

View File

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