1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-26 06:49:22 +00:00

Fix an issue with web links

This commit is contained in:
Pierre HUBERT 2019-06-24 20:27:20 +02:00
parent 4bcb56aa08
commit 66b4d19004
2 changed files with 12 additions and 5 deletions

View File

@ -74,6 +74,8 @@ class Post implements LikeElement {
bool get canUpdate => access == UserAccessLevels.FULL; bool get canUpdate => access == UserAccessLevels.FULL;
bool get hasLinkImage => linkImage != null;
bool get canDelete => bool get canDelete =>
access == UserAccessLevels.FULL || access == UserAccessLevels.FULL ||
access == UserAccessLevels.INTERMEDIATE; access == UserAccessLevels.INTERMEDIATE;

View File

@ -263,10 +263,15 @@ class _PostTileState extends State<PostTile> {
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: const EdgeInsets.only(right: 8.0), padding: const EdgeInsets.only(right: 8.0),
child: NetworkImageWidget( child: widget.post.hasLinkImage
? NetworkImageWidget(
url: widget.post.linkImage, url: widget.post.linkImage,
width: 70, width: 70,
roundedEdges: false, roundedEdges: false,
)
: Icon(
Icons.link,
size: 70,
), ),
), ),
Flexible( Flexible(