mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-25 22: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 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,
|
||||||
|
@ -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: [
|
||||||
|
Loading…
Reference in New Issue
Block a user