feat(mobile): Prevent premature image cache eviction when higher image loading is enabled (#26208)

* feat(mobile): enhance image loading with error handling and eviction options

* pull request suggestions: remove log and remove useless local implementation
This commit is contained in:
Luis Nachtigall
2026-02-25 23:31:37 +01:00
committed by GitHub
parent 3bed1b6131
commit 4c79c3c902
3 changed files with 13 additions and 8 deletions
@@ -93,9 +93,10 @@ class RemoteFullImageProvider extends CancellableImageProvider<RemoteFullImagePr
uri: getThumbnailUrlForRemoteId(key.assetId, type: AssetMediaSize.preview, thumbhash: key.thumbhash),
headers: headers,
);
yield* loadRequest(previewRequest, decode);
final loadOriginal = assetType == AssetType.image && AppSetting.get(Setting.loadOriginal);
yield* loadRequest(previewRequest, decode, evictOnError: !loadOriginal);
if (assetType != AssetType.image || !AppSetting.get(Setting.loadOriginal)) {
if (!loadOriginal) {
return;
}