File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,20 +31,21 @@ class _ImageGridViewState extends State<ImageGridView> {
3131 void _onTapImage (ImageModel image) {
3232 final bool selected = widget.selectedList.contains (image);
3333 if (widget.selectedList.isNotEmpty && ! selected) {
34- if ( widget.onSelectImage != null ) widget. onSelectImage ! (image);
34+ widget.onSelectImage? . call (image);
3535 } else if (selected) {
36- if ( widget.onDeselectImage != null ) widget. onDeselectImage ! (image);
36+ widget.onDeselectImage? . call (image);
3737 } else {
38- if ( widget.onTapImage != null ) widget. onTapImage ! (image);
38+ widget.onTapImage? . call (image);
3939 }
4040 }
4141
4242 void _onLongPressImage (ImageModel image) {
4343 if (widget.selectedList.isEmpty) {
4444 HapticFeedback .mediumImpact ();
4545 }
46+ if (widget.selectedList.contains (image)) return ;
4647 setState (() {
47- if ( widget.onSelectImage != null ) widget. onSelectImage ! (image);
48+ widget.onSelectImage? . call (image);
4849 });
4950 }
5051
@@ -69,8 +70,7 @@ class _ImageGridViewState extends State<ImageGridView> {
6970 return ClipRRect (
7071 borderRadius: index == widget.imageList.length - 1
7172 ? BorderRadius .only (
72- topRight: widget.imageList.length <
73- Settings .getImageCrossAxisCount (context)
73+ topRight: widget.imageList.length < Settings .getImageCrossAxisCount (context)
7474 ? Radius .circular (10.0 )
7575 : Radius .zero,
7676 bottomRight: Radius .circular (10.0 ),
Original file line number Diff line number Diff line change @@ -295,7 +295,11 @@ Future<XFile?> downloadImage(
295295 if (! await askMediaPermission ()) return null ;
296296 try {
297297 await ApiClient .download (
298- path: image.elementUrl,
298+ path: 'action.php' ,
299+ queryParameters: {
300+ 'id' : image.id,
301+ 'part' : 'e' ,
302+ },
299303 outputPath: localPath,
300304 );
301305 await ImageGallerySaver .saveFile (
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ dependencies:
5050 # Device
5151 device_info_plus : ^10.1.0 # Get device info (version)
5252 flutter_local_notifications : ^17.2.0 # Throws notifications on download or upload
53- open_filex : ^4.3.2 # Open files with devices apps
53+ open_filex : ^4.4.0 # Open files with devices apps
5454 workmanager : ^0.5.0 # Background processes (auto upload)
5555 image_gallery_saver : ^2.0.3 # Download images
5656
You can’t perform that action at this time.
0 commit comments