ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

Incremental updating of resources grid #126

Open kirillt opened 2 years ago

kirillt commented 2 years ago

When we switch to ResourcesGridFragment from GalleryFragment, the resources collection must be refreshed. Because actions in gallery screen could affect the collection (tags removed from some resources). Also, new resources could appear in the folder and also existing resource could get new tags from other devices. That means we can have both additions to and deletions from the collection.

Right now, we refresh the resources collection in the simplest way possible: just clear it and load again. This causes unnecessary thumbnail redrawings. This might be noticeable to a user as flickering.

We should refresh it in smart way: load new collection, calculate the difference, remove disappeared resources and insert new ones.