Location disappears from search page

Bug #1584669 reported by Ludovico Pavesi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Libre BusTO
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Search for "metro"
2. notice that stop 8213 has a location
3. scroll down
4. scroll up
5. location is gone

Related branches

Revision history for this message
Fabio Mazza (fab4mazz) wrote :

The bug is present in the emulator, too. How does that happen is kind of a mystery, the logcat shows no error/warning/debug info.
The error must be related to the ListView model type. I think this is what happens:
1. The first stops in the list which should appear on the screen are rendered
2. Scrolling down, the first liist objects are destroyed and the next are created
3. Scrolling up, the previous elements are created again following the ListView adapter model
As I'm not familiar with the app, I can't tell what is wrong, but I think it might be because the List Adapter doesn't include (in the model) the stop location or when it creates new object it can't access the location string.

Changed in bus-torino:
status: New → Confirmed
Revision history for this message
Ludovico Pavesi (lvps) wrote :

I think it's the view holder pattern™: every time you scroll up\down, it renders a new list element by modifying an old one, but it doesn't set the location TextView as visible.

I'll fix it, someday (hopefully soon)...

Revision history for this message
Ludovico Pavesi (lvps) wrote :

It's fixed in "smallfix" branch.
Committing with "--fixes lp:1584669" did nothing, selecting "Link a related branch" did nothing, but the code's there.

Ludovico Pavesi (lvps)
Changed in bus-torino:
status: Confirmed → Fix Committed
Valerio Bozzolan (bozzy)
Changed in bus-torino:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.