jacob-g / cleveland-rta-next-bus-train

Cleveland Transit Mobile Application
0 stars 0 forks source link

Not auto-selecting station properly #72

Closed jacob-g closed 7 years ago

jacob-g commented 7 years ago

When opening the arrivals page either from a homescreen icon or the favorites list, it sometimes doesn't pick the station properly and just defaults to the first item.

Making this much harder to diagnose is the fact that I can't actually reproduce this when it's connected to the debugger.

jacob-g commented 7 years ago

Excerpt from code:

org.futuresight.clevelandrtanextbustrain I/System.out: Searching for preselected ID
org.futuresight.clevelandrtanextbustrain I/System.out:  -> Found it!!!
org.futuresight.clevelandrtanextbustrain I/System.out: Searching for preselected ID

It's loading the stop list twice.

jacob-g commented 7 years ago

More detailed:

Searching for preselected ID (16137)
 -> Found it!!!
Searching for preselected ID (-1)

Also,


06-16 13:46:03.657 8740-8740/? I/System.out: Getting directions
06-16 13:46:03.676 8740-8740/? I/System.out: Getting stops
06-16 13:46:03.702 8740-8740/? I/System.out: Getting stops```

This means that it is retrieving directions twice.
jacob-g commented 7 years ago
06-16 13:48:12.483 11056-11093/org.futuresight.clevelandrtanextbustrain I/System.out: Getting directions (147)
06-16 13:48:12.505 11056-11095/org.futuresight.clevelandrtanextbustrain I/System.out: Getting directions (147)
06-16 13:48:12.524 11056-11095/org.futuresight.clevelandrtanextbustrain I/System.out: Getting stops (147, 14)
06-16 13:48:12.539 11056-11095/org.futuresight.clevelandrtanextbustrain I/System.out: Getting stops (147, 14)
06-16 13:48:12.552 11056-11056/org.futuresight.clevelandrtanextbustrain I/System.out: Searching for preselected ID (16137)
06-16 13:48:12.552 11056-11056/org.futuresight.clevelandrtanextbustrain I/System.out:  -> Found it!!!
06-16 13:48:12.554 11056-11056/org.futuresight.clevelandrtanextbustrain I/System.out: Searching for preselected ID (-1)

It is retrieving directions (and then stops) for the same line twice.

jacob-g commented 7 years ago

The root issue is that the event for when the line is selected is triggered twice.

jacob-g commented 7 years ago

This appears to still be happening.

jacob-g commented 7 years ago

After preventing the line selection event from being triggered twice in a row, I get this:

06-17 13:39:18.591  8774  8774 I System.out: Got lines
06-17 13:39:18.605  8774  8774 I System.out: Line selected!
06-17 13:39:18.605  8774  8774 I System.out:  -> (Red - Red Line)
06-17 13:39:18.621  8774  8774 I System.out: Got directions
06-17 13:39:18.651  8774  8774 I System.out: Got stations
06-17 13:39:18.675  8774  8774 I System.out: Got stations
jacob-g commented 7 years ago

I haven't triggered this one in a while, so if it still happens, it's pretty rare. I'm going to mark this as won't fix.