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:
parent
de7feb36ce
commit
a07c7af715
@ -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,
|
||||
|
@ -222,6 +222,7 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
|
||||
leading: ConversationImageWidget(
|
||||
conversation: conversation,
|
||||
users: _usersList,
|
||||
noUserImage: conversation.isGroupConversation,
|
||||
),
|
||||
title: Row(
|
||||
children: [
|
||||
|
Loading…
Reference in New Issue
Block a user