gallery not updating list based on sort #618
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Gallery was not updating how its list was sorted after the preference had been adjusted. Also, the gallery's last updated was meant to display when the goals were last fetched.
The gallery was not monitoring for changes to the sorting preference. It needed a trigger to sort the list anew. This was removed in d181dba. 'Update goals' can stay, it is the fetch goals that was to be reduced. Furthermore, since gallery's last updated is meant to indicate how fresh the data is (when they were last fetched), gallery's setting this to now where it did does not necessarily coincide with fetching the goals anew. Instead, the goal manager already provides this nugget.
For UI changes including screenshots of before and after is great.
Validation
Ran app in simulator.
gallery -> settings -> sort pref, picked another, and back to gallery from settings
Noticed sort had taken effect.
Also noticed last updated seems much more up-to-date and less out of sync, as reported in #588.