From 7b49542fde5cb708fa4d192e1e2fb71fabe1c5ac Mon Sep 17 00:00:00 2001 From: WinG4merBR <68250074+WinG4merBR@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:32:02 -0300 Subject: [PATCH] Fix ProfileCacheManager --- .../net/cakeyfox/foxy/utils/profile/ProfileCacheManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foxy/src/main/kotlin/net/cakeyfox/foxy/utils/profile/ProfileCacheManager.kt b/foxy/src/main/kotlin/net/cakeyfox/foxy/utils/profile/ProfileCacheManager.kt index 780bff9b..5ff5da0c 100644 --- a/foxy/src/main/kotlin/net/cakeyfox/foxy/utils/profile/ProfileCacheManager.kt +++ b/foxy/src/main/kotlin/net/cakeyfox/foxy/utils/profile/ProfileCacheManager.kt @@ -18,9 +18,9 @@ object ProfileCacheManager { .maximumSize(100) .build() - suspend fun loadImageFromCache(url: String): BufferedImage? { + suspend fun loadImageFromCache(url: String): BufferedImage { return imageCache.getIfPresent(url) ?: run { - val image = ImageUtils.loadImageFromURL(url) + val image = ImageUtils.loadProfileAssetFromURL(url) imageCache.put(url, image) image }