refactor: simplify thumbnail cache API and remove unused code
- ThumbnailDiskCache: combine get()+decodeThumbnail() into single load() method. Move bitmap resize logic into generateFromFile() so callers just pass a source file and the cache handles decode+resize+save. - ProfilePictureFetcher: remove unused `options` field, remove @Stable annotation, delegate all resize logic to ThumbnailDiskCache. - UserAvatar: fix stale doc comment. https://claude.ai/code/session_01PBJS3HDrurLP3i5n4tMsCv
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ data class ProfilePictureUrl(
|
||||
* @param contentDescription Accessibility description
|
||||
* @param loadProfilePicture Whether to load the profile picture (false = show robohash only)
|
||||
* @param loadRobohash Whether to generate robohash (false = show generic icon)
|
||||
* @param useThumbnailCache Whether to wrap the URL with profilepic:// scheme for thumbnail caching
|
||||
* @param useThumbnailCache Whether to use the thumbnail disk cache for faster repeated loads
|
||||
*/
|
||||
@Composable
|
||||
fun UserAvatar(
|
||||
|
||||
Reference in New Issue
Block a user