Merge branch 'soru/save-file-picker' into 'main'

feat: Add a proper file saver

Closes #381 and #213

See merge request famedly/fluffychat!439
This commit is contained in:
Krille Fear 2021-07-13 16:29:31 +00:00
commit 949a776fcb
8 changed files with 73 additions and 63 deletions

View file

@ -24,8 +24,8 @@ class ImageViewerController extends State<ImageViewer> {
VRouter.of(context).to('/rooms');
}
/// Open this file with a system call.
void openFileAction() => widget.event.openFile(context);
/// Save this file with a system call.
void saveFileAction() => widget.event.saveFile(context);
/// Go back if user swiped it away
void onInteractionEnds(ScaleEndDetails endDetails) {

View file

@ -31,7 +31,7 @@ class ImageViewerView extends StatelessWidget {
),
IconButton(
icon: Icon(Icons.download_outlined),
onPressed: controller.openFileAction,
onPressed: controller.saveFileAction,
color: Colors.white,
tooltip: L10n.of(context).downloadFile,
),