Realtime-Port-Authority icon indicating copy to clipboard operation
Realtime-Port-Authority copied to clipboard

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

Open mikeantonacci opened this issue 4 years ago • 0 comments

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 avatar May 19 '20 06:05 mikeantonacci