Code quality

This commit is contained in:
Jack251970 2025-04-05 16:38:06 +08:00
parent 7723c4454b
commit 08230df5c7

View file

@ -5,12 +5,10 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using static Flow.Launcher.Infrastructure.Http.Http;
namespace Flow.Launcher.Infrastructure.Image
{
@ -28,7 +26,6 @@ namespace Flow.Launcher.Infrastructure.Image
public const int SmallIconSize = 64;
public const int FullIconSize = 256;
private static readonly string[] ImageExtensions = { ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".ico" };
public static async Task InitializeAsync()
@ -183,7 +180,7 @@ namespace Flow.Launcher.Infrastructure.Image
private static async Task<BitmapImage> LoadRemoteImageAsync(bool loadFullImage, Uri uriResult)
{
// Download image from url
await using var resp = await GetStreamAsync(uriResult);
await using var resp = await Http.Http.GetStreamAsync(uriResult);
await using var buffer = new MemoryStream();
await resp.CopyToAsync(buffer);
buffer.Seek(0, SeekOrigin.Begin);