mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 07:04:07 +00:00
fix image not exported correctly if not stored
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
4b11031560
commit
c13b80990f
1 changed files with 13 additions and 0 deletions
|
|
@ -207,6 +207,19 @@ class _SynchronizedImageViewerScreenState
|
|||
Future<void> _exportFile() async {
|
||||
final item = widget.galleryItems[_currentIndex].mediaService;
|
||||
|
||||
if (!item.storedPath.existsSync()) {
|
||||
await item.storeMediaFile();
|
||||
if (!mounted) return;
|
||||
if (userService.currentUser.storeMediaFilesInGallery) {
|
||||
showSnackbar(
|
||||
context,
|
||||
context.lang.galleryExportSuccess,
|
||||
level: SnackbarLevel.success,
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (item.mediaFile.type == MediaType.video) {
|
||||
await saveVideoToGallery(
|
||||
|
|
|
|||
Loading…
Reference in a new issue