Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

busMarkers are removed while they're added every time a route is selected after the route has already been previously selected #333

Open
mikeantonacci opened this issue May 19, 2020 · 0 comments

Comments

@mikeantonacci
Copy link
Contributor

mikeantonacci commented May 19, 2020

For some reason in the unselectVehicleSubscription we have this:

unselectVehicleSubscription = toggledRoutesFlowable
    .skipWhile(Route::isSelected)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())

That skipWhile call causes the emitted route to be skipped the first time isSelected is true, but as soon as isSelected was false once, it's never skipped again. Not sure why we would have intended this behavior.

It doesn't seem to break anything consistently, I only noticed it because I kept seeing logging like this in the debug console:

D/RouteSelection: getting both routes: 61A, [61A]
D/PatternViewModel: Getting patternSelections: 61A
D/BusMapFragment: removing all 61A's
W/realtimetracke: Accessing hidden field Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; (greylist, reflection, allowed)
D/BusMapFragment: Selecting vehicle observable
D/BusMapFragment: Calling x0
D/BusMapFragment: updating map with [61A]
D/PatternViewModel: Changing stop selection state

@mikeantonacci mikeantonacci changed the title busMarkers are removed every time a route is selected after the first time busMarkers are removed while they're added every time a route is selected after the route has already been previously selected May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant