Skip to content

Commit 1adf4c1

Browse files
committed
Check if image has download url before displaying button
1 parent cc893cc commit 1adf4c1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/views/image/image_page.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,12 @@ class _ImagePageState extends State<ImagePage> {
708708
},
709709
),
710710
),
711-
IconButton(
712-
onPressed: () => downloadImages([_currentImage]),
713-
icon: Icon(Icons.download),
714-
),
711+
if (_currentImage.elementUrl != "")
712+
IconButton(
713+
onPressed: () => downloadImages([_currentImage]),
714+
icon: Icon(Icons.download),
715+
)
716+
,
715717
];
716718

717719
return widget.isAdmin ? adminActions : userActions;

0 commit comments

Comments
 (0)