Skip to content

Conversation

@zerox80
Copy link
Contributor

@zerox80 zerox80 commented Jan 19, 2026

Thumbnail Cache Refactoring and Avatar Fixes

Summary

This pull request refactors the thumbnail caching mechanism to improve performance and stability, and includes critical fixes for user avatar loading. The legacy ThumbnailsCacheManager has been replaced by an optimized ThumbnailsRequester implementation, and several thread safety issues have been resolved.

Technical Details

Thumbnail Caching

  • Refactoring: Completely removed ThumbnailsCacheManager and DiskLruImageCache in favor of a modern, streamlined approach within ThumbnailsRequester.
  • Thread Safety: Addressed race conditions in ThumbnailsRequester when initializing the shared disk and memory caches. Access to these caches is now properly synchronized.
  • Optimization: Adjusted thumbnail sizing logic to prevent memory waste and improve loading times.
  • Dead Code Removal: Cleaned up unused legacy code and resources related to the old caching system.

Avatar Loading

  • Graph API Integration: Updated the user avatar loading logic to utilize the Graph API endpoint, ensuring reliable retrieval of user profile images.
  • Cache Control: Fixed issues with avatar cache invalidation and loading control to ensure users always see the correct profile picture.
  • Bug Fixes: Resolved specific crashes and loading failures related to avatar requests in various parts of the UI (Drawer, Toolbar, Upload List).

Other Changes

  • Code Quality: Resolved extensive Detekt issues, including formatting and spacing violations.
  • Stability: Fixed potential crashes caused by incorrect context usage or missing null checks in the thumbnail generation flow.

Impact

These changes significantly reduce the maintenance burden by removing complex legacy caching code and provide a smoother user experience with faster and more reliable thumbnail and avatar loading.

Testing

  • Verified that file thumbnails load correctly in the file list and grid view.
  • Verified that user avatars appear correctly in the navigation drawer and toolbar.
  • Confirmed that removing the legacy cache classes does not introduce regressions in image loading.

@zerox80 zerox80 force-pushed the feature/clean-thumbnails-avatars branch from 70c772f to 641d2a6 Compare January 19, 2026 13:23
zerox80 added 2 commits January 20, 2026 09:05
This commit acts as a squash of the thumbnail cache refactoring and avatar fixes.

See PR description for full details.
@zerox80 zerox80 force-pushed the feature/clean-thumbnails-avatars branch from 6f322b4 to 72d55fa Compare January 20, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant