frapperino / sketchagram

Smartwatch application
Other
0 stars 0 forks source link

Sorting internal list may result in faulty indexes, Android #19

Open alehar9320 opened 9 years ago

alehar9320 commented 9 years ago

When sorting the internal contactList in different ways, the index position returned from when a user presses a list item may be faulty since it may change in-between first displaying the list and user pressing it.

On top of this android must reference the internal list in order to detect changes and thereby update the graphics upon a change.

Either this isn't a problem, because the list is never resorted in-between list being shown, and user pressing it, or it will result in faulty indexes, by this cause.

Normally you would return a copy of the internal list to the graphics, but in order for android to detect changes, as mentioned above. This cannot however be done without either forcing us to also update the copy, which is very unpractical, or to disregard Android's standard way, by using for example an Observer-pattern, but that's just wrong!

ollmatt commented 9 years ago

Let's see if this causes a bug and if it does we will deal with it then.