Skip to content

Commit

Permalink
Fix loading from disk cache
Browse files Browse the repository at this point in the history
  • Loading branch information
SKProCH committed Jun 8, 2022
1 parent 820b7e2 commit 64bc399
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AsyncImageLoader.Avalonia/AsyncImageLoader.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<RepositoryType>git</RepositoryType>
<PackageTags>image cross-platform avalonia avaloniaui c-sharp-library</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>2.1.0</Version>
<PackageReleaseNotes>- Add ImageLoader.IsLoading property</PackageReleaseNotes>
<Version>2.1.1</Version>
<PackageReleaseNotes>- Fix loading from disk cache</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public DiskCachedWebImageLoader(HttpClient httpClient, bool disposeHttpClient, s
protected override Task<Bitmap?> LoadFromGlobalCache(string url) {
var path = Path.Combine(_cacheFolder, CreateMD5(url));
if (File.Exists(path)) {
return Task.FromResult(new Bitmap(url))!;
return Task.FromResult(new Bitmap(path))!;
}
return Task.FromResult<Bitmap?>(null);
}
Expand Down

0 comments on commit 64bc399

Please sign in to comment.