Refactoring NearbyParentFragmentPresenter.loadPlacesDataAsync() (Part 2) #6609
+93
−41
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.
Description (required)
Fixes #6587
What changes did you make and why?
This PR continues and completes work on refactoring the
loadPlacesDataAsync()method.Nearly all of the changes in this PR are simply moving existing related code into separate methods, and then calling the new methods where the old code used to be. Documentation is added to the new methods. Some symbols have been renamed.
The new methods can help maintainers isolate and fix bugs quicker. The names and documentation of these new methods help explain what the code is doing.
NOTE: I highly recommend reviewers look at each commit in this PR sequentially. The commits build upon each other, but each commit is an isolated and small refactoring.
Tests performed (required)
Tested ProdDebug on Android Studio Emulator with API level 36.
The Nearby fragment appears to behave the same as the main branch when using bookmarks and clicking on grey pins while the
loadPlacesDataAsync()method is running (which can easily be run by moving the map).