OneBusAway / onebusaway-iphone

OBA development has moved!
https://github.com/OneBusAway/OBAKit
Apache License 2.0
219 stars 117 forks source link

Bookmarks on the map table are missing some data #1407

Closed aaronbrethorst closed 4 years ago

aaronbrethorst commented 5 years ago

Expected behavior

The subtitle shows something

Actual behavior

Nada.

Steps to reproduce the behavior

  1. Add a bookmark
  2. Navigate across the map such that you can see the bookmark
  3. Look at the Map Table

Screenshot of the issue (if applicable)

img_21d239311c43-1

App Version/Hardware

18.2.2

victorray84 commented 5 years ago

I want to work on this issue. Please assign me this one.

aaronbrethorst commented 5 years ago

@victorray84 I can't assign you since you're not a part of this organization, but please feel free to proceed assuming that it's yours. I look forward to the PR, and feel free to let me know if you have questions.

ajqjohnson199623 commented 5 years ago

Oh ok alright, I got my phone for app OneBusAway and I looking particular buses and nearly stops and also coach number for buses here in Seattle Area yesterday. But, I didn’t understand have an issue for me on my phone app for OneBusAway miss.

ApolloZhu commented 4 years ago

After some investigation, I found the cause of this issue. The text goes after is routeShortName

https://github.com/OneBusAway/onebusaway-iphone/blob/c9866d7a6fdc237fd5ed0996135a02967f7ddb67/OneBusAway/ui/MapTable/MapTableViewController.swift#L328

However, when saving bookmarks for stops, such field is not populated:

https://github.com/OneBusAway/onebusaway-iphone/blob/c9866d7a6fdc237fd5ed0996135a02967f7ddb67/OBAKit/Models/unmanaged/OBABookmarkV2.m#L45-L54

Therefore it is empty. Then, to solve this issue, we could

  1. Display the name only and no routes, like the bookmarks tab. (relatively easy)
  2. Display the routes available at the stop, like nearby stops. Solutions I can think of are:
    1. Fetch the routes at that stop when building the view model (somewhat extra work)
    2. Save the routes in routeShortName when saving bookmark (need to update bookmarks tab)
    3. Create separate bookmark models for stops and routes (non-trivial)

Which one do you think I should implement? @aaronbrethorst