MyHush / SilentDragonAndroid

Android companion app for SilentDragon
https://www.myhush.org
GNU General Public License v3.0
5 stars 12 forks source link

List of duplicate transactions when we return to the application. #29

Open gilardh opened 4 years ago

gilardh commented 4 years ago

List of transactions is duplicated when we return to the application after a long time.

Screenshot_20191116-030800_SilentDragon

For information: When you click on the button to refresh the data at the top of the screen, the list is updated correctly.

leto commented 4 years ago

This is an interesting bug

leto commented 4 years ago

@gilardh it sounds like we are appending the data sometimes, when it should always be clearing it out then adding all fresh data

leto commented 4 years ago

@gilardh If you can help me see if this still happens in the latest version of code or if this can be closed, that would be helpful. Thanks!

jahway603 commented 4 years ago

@gilardh I have not been able to reproduce this in my testing. Were you able to reproduce this issue on the latest release?

leto commented 4 years ago

@jahway603 this was a valid bug at one time. Not sure if things have changed.

It comes from the fact that in some edge case, maybe with timeouts or changing networks, the GUI appends all transaction data to what is there already, instead of clearing it out first. The result is seeing every tx twice. It's not easy to trigger, it's something to do with timing out and perhaps putting the paired laptop to sleep and waking it up. I have seen it myself a few times.

leto commented 4 years ago

@gilardh @jahway603 i think we can improve the code to always clear the tx list before appending, and this edge case will go away.