fix: Save file

onboarding
Christian Pauly 4 years ago
parent db79a96d08
commit 757ec7bb27

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

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

Loading…
Cancel
Save