Closed kirillt closed 2 years ago
Probably this happens for existing resources after the app restarted. New resources have their previews and thumbnails loaded.
This issue reproduces on my Android 9 device and it doesn't on Android 11.
The way to reproduce (I guess, on any device, but better to check):
Explanation: we store the index as app's data and previews/thumbnails as app's cache. The index still contains all resources, so re-indexing doesn't heppen, but previews generation is triggered only during indexing.
Apparently, Android can clean cache at any moment, so we should either store previews/thumbnails as data or the index as cache. If we want to stick to keeping images in cache, then we should check their presence during folder opening. This may reduce performance significantly for huge folders.
Creating folder: space.taran.arknavigator D/previews: previews provided in 12553ms space.taran.arknavigator D/resources-index: 1572 resources returned
After cleaning cache: /space.taran.arknavigator D/previews: previews provided in 25169ms sace.taran.arknavigator D/resources-index: 1572 resources returned
Phone: Xiaomi A2 Android: 10 Folder: 1572 files, ~400mb size
Used build 165, previews and thumbnails are visible
@vedranqa that's strange.. no mistakes? Was the second result (after cleaning cache) opening or creating the folder?
@kirillt this second case After cleaning cache is Opening same folder like in first case.
Implemented in #143
This is active on main build (id 204) after deleting cache we dont have thumbnails and previews.
@vedranqa build 204 is too early, build 208 is correct one. Thank you, it looks good.