Skip to content

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

@mikeantonacci

Description

@mikeantonacci

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions