Fix issue #6360: Nearby: blue dot sometimes "jumps" back and forth between two places#6726
Open
Jason-Whitmore wants to merge 1 commit intocommons-app:mainfrom
Open
Fix issue #6360: Nearby: blue dot sometimes "jumps" back and forth between two places#6726Jason-Whitmore wants to merge 1 commit intocommons-app:mainfrom
Jason-Whitmore wants to merge 1 commit intocommons-app:mainfrom
Conversation
…changes Before this commit, when a medium location change occurred, the LocationServiceManager would not set the location variable to the newest Location. This would later cause the user's location overlay to be drawn at an older and incorrect location. This commit correctly sets the class's location variable to the new location when a medium location change occurs. The user location overlay is now drawn at this correct location.
|
✅ Generated APK variants! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #6360
What changes did you make and why?
This code change sets the
lastLocationVarclass variable inLocationServiceManager.ktto the new location when a medium location change occurs. This behavior is currently done with significant and slight location changes (as seen in the surrounding if statements).Some of the calls to
NearbyParentFragment.updateUserLocationOverlays()use the Location retrieved fromLocationServiceManager'slastLocationVarclass variable. Prior to this code change, this class variable was not being updated when a medium location change occurred. This would then cause the blue dot to be drawn at the wrong (old) location in some cases (which creates the appearance of the blue dot "jumping").The change in this PR causes the blue dot to be drawn at the correct (new) Location retrieved from
LocationServiceManagerTests performed (required)
Tested ProdDebug on Android Studio emulator with API level 36.
Reproducing the bug and testing the bug fix (with either the Android Studio emulator or with a real device):
Following these steps on main reproduces the "jumping" blue dot which is drawn at the correct new user location and the incorrect old user location (see the original issue for an example).
On this PR branch, the blue dot is only drawn at the correct new user location.