make all ExpandableImages downloadable

There might have been a reason why I didn't do this but I don't remember it...
This commit is contained in:
Henry Hiles 2026-12-01 01:59:08 -05:00
commit dccbda7870
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -10,7 +10,7 @@ import "package:nexus/widgets/common/error_dialog.dart";
extension ShowImageViewer on BuildContext {
/// Shows the image from [request] fullscreen, zoomable.
///
/// If [downloadFilename] is set, a download button is shown, suggesting it.
/// The download button suggests [downloadFilename], falling back to the media ID.
void showImageViewer(
WidgetRef ref,
DownloadMediaRequest request, {
@ -58,16 +58,15 @@ extension ShowImageViewer on BuildContext {
mainAxisSize: .min,
spacing: 8,
children: [
if (downloadFilename != null)
M3EButton(
onPressed: () => context.saveAttachment(
ref,
request.mxc,
encrypted: request.encrypted,
filename: downloadFilename,
),
child: Icon(Icons.download),
M3EButton(
onPressed: () => context.saveAttachment(
ref,
request.mxc,
encrypted: request.encrypted,
filename: downloadFilename,
),
child: Icon(Icons.download),
),
M3EButton(
onPressed: Navigator.of(context).pop,
child: Icon(Icons.close),