umts / pvta-multiplatform

Transit realtime app for mobile devices
Other
6 stars 5 forks source link

Your Routes/Stops Text Doesn't Appear on My Buses #392

Closed mboneil10 closed 7 years ago

mboneil10 commented 7 years ago

So, this is the screen that I start with.

screen shot 2017-06-21 at 12 46 38 pm

Both one stop and a route are added. Doesn't matter what route or stop. Also, this error occurs even if I were to add just a stop or route separately.

screen shot 2017-06-21 at 12 46 54 pm

I clicked on the stop and toggled the heart icon (unfavorited it). Then, I clicked back to the My Buses page. Repeated the same process for the route. The screen I'm left with:

screen shot 2017-06-21 at 12 47 14 pm

The text "No favorite routes yet!" and "No favorite stops yet!" should return to the page when I click back to My Buses, right?

mboneil10 commented 7 years ago

@akaplo, thoughts?

werebus commented 7 years ago

Huh. I could see either behavior. You could make the argument that the text is just for new users and once they've added and removed some favorites then they know what those lists are for. I guess?

mboneil10 commented 7 years ago

That's what I was thinking, too. But I'm not 100% sure.

akaplo commented 7 years ago

I can guarantee that this behavior wasn't on purpose.

This occurs because of this line. First-time users have undefined favorites arrays. After they've added something to their favorites and then removed it, these arrays are defined, but empty. The referenced line checks for whether the array is defined when presenting the No favorite routes/stops yet! messages.

mboneil10 commented 7 years ago

So... This is an error? And should be fixed? @akaplo

akaplo commented 7 years ago

Yup! Should be simple.