fix(mobile): download asset to Camera folder on Android (#12355)

* fix(mobile): download asset to Camera folder on Android

* remove unused import

* better message

* linting
This commit is contained in:
Alex 2024-09-05 12:33:55 -05:00 committed by GitHub
parent 0148005931
commit 77904a54d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 18 deletions

View file

@ -93,6 +93,10 @@ class GalleryAppBar extends ConsumerWidget {
);
}
handleDownloadAsset() {
ref.read(imageViewerStateProvider.notifier).downloadAsset(asset, context);
}
return IgnorePointer(
ignoring: !ref.watch(showControlsProvider),
child: AnimatedOpacity(
@ -109,13 +113,7 @@ class GalleryAppBar extends ConsumerWidget {
onFavorite: toggleFavorite,
onRestorePressed: () => handleRestore(asset),
onUploadPressed: asset.isLocal ? () => handleUpload(asset) : null,
onDownloadPressed: asset.isLocal
? null
: () =>
ref.read(imageViewerStateProvider.notifier).downloadAsset(
asset,
context,
),
onDownloadPressed: asset.isLocal ? null : handleDownloadAsset,
onToggleMotionVideo: onToggleMotionVideo,
onAddToAlbumPressed: () => addToAlbum(asset),
onActivitiesPressed: handleActivities,