feat(mobile): improve downloading algorithm for sharing#27312
Conversation
|
Tested on iOS simulator also works there. I also noticed that sometimes pressing share takes forever. Actually not sure what's causing the difference. Really intresting |
|
I'll have to test it more extensively on iOS to figure out why it takes forever to load sometimes, on Android that didn't happen to me. |
|
I am hoping that this PR could help with my issue, where if I try to share a photo and I am not in my home network (though I have a good connection) it takes forever or fails. It happens on both ios and android for me. |
| final taskId = 'share-$remoteId-${DateTime.now().microsecondsSinceEpoch}'; | ||
| final sanitizedFilename = asset.name.replaceAll(RegExp(r'[\\/]'), '_'); | ||
| final task = DownloadTask( | ||
| taskId: taskId, |
There was a problem hiding this comment.
Maybe add a share download group ID? The existing downloads use a separate ID so this won't pollute the queue, but it is still a good idea to group these with a different ID.
There was a problem hiding this comment.
Done. Please test on iOS before merging.
|
📱 Android release APK (universal) — Download: https://github.com/immich-app/immich/actions/runs/26525569825/artifacts/7246639403 Installs as a separate app (applicationId |
…7312) * feat(mobile): better downloading while sharing * chore: separate download group --------- Co-authored-by: shenlong-tanwen <[email protected]>
|
Hi all, new here but I'm hitting what looks like this issue on iOS. Sharing a photo via "Create link" → Messages shows a "Preparing..." message that flashes and disappears almost instantly — the share never completes. Environment:
This used to work a few weeks ago, so it may have regressed around the same area this PR touches. Noting that the PR description mentions it was untested on iOS — wanted to flag that it doesn't seem to fully resolve the problem there yet, unless I'm hitting something separate. |
|
@vanaya2002 Please raise an issue describing the problem. Missed that you mentioned v2.7.5. This PR is not part of that version, so it is NOT caused by this change. |
Description
Significantly improves the "share" behavior for remote assets.
Adds a linear progress indicator & percentage for the "preparing" screen.
Uses the same scheme as for the regular "download" action, using
background_downloader.This improves download time dramatically for the "share" function specifically.
How Has This Been Tested?
Video demo
sharing-download.mp4