fix: Save file

This commit is contained in:
Christian Pauly 2021-04-13 16:08:28 +02:00
parent f1166b2166
commit 3f854d6984
2 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,8 @@ extension MatrixFileExtension on MatrixFile {
element.click();
element.remove();
} else {
if (!(await Permission.storage.request()).isGranted) return;
if (PlatformInfos.isMobile &&
!(await Permission.storage.request()).isGranted) return;
final downloadsDir = PlatformInfos.isDesktop
? (await getDownloadsDirectory()).path
: Platform.isAndroid

View File

@ -25,13 +25,13 @@ class ImageViewerView extends StatelessWidget {
actions: [
IconButton(
icon: Icon(Icons.reply_outlined),
onPressed: () => controller.forwardAction,
onPressed: controller.forwardAction,
color: Colors.white,
tooltip: L10n.of(context).share,
),
IconButton(
icon: Icon(Icons.download_outlined),
onPressed: () => controller.openFileAction,
onPressed: controller.openFileAction,
color: Colors.white,
tooltip: L10n.of(context).downloadFile,
),