fix: Last bits for the release

This commit is contained in:
Christian Pauly
2020-09-21 19:21:24 +02:00
parent 165c64ce36
commit 1db9bdd975
6 changed files with 44 additions and 25 deletions

View File

@ -24,8 +24,11 @@ extension MatrixFileExtension on MatrixFile {
element.click();
element.remove();
} else {
var tempDir = await getTemporaryDirectory();
final file = File(tempDir.path + '/' + name.split('/').last);
final downloadsDir = Platform.isAndroid
? (await getExternalStorageDirectory())
: (await getApplicationDocumentsDirectory());
final file = File(downloadsDir.path + '/' + name.split('/').last);
file.writeAsBytesSync(bytes);
await OpenFile.open(file.path);
}