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.
When we switch to
ResourcesGridFragment
fromGalleryFragment
, 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.