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:
Claude
2026-04-05 15:36:34 +00:00
parent 0df4c5e19c
commit 361ef6798e
3 changed files with 79 additions and 117 deletions
@@ -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(