y20k / transistor

Transistor - Simple Radio App for Android
http://y20k.org/transistor/
MIT License
435 stars 122 forks source link

Find Station results not showing if the searched text is changed before the results show #361

Open skull591 opened 2 years ago

skull591 commented 2 years ago

Describe the bug In the "Find Station" dialog, when entering three letters the app starts to fetch results. Before the result shows (i.e., the loading circle is still there), if one changes the searched text quickly, the dialog hangs with the loading circle and the results never show.

To Reproduce Steps to reproduce the behavior:

  1. tap on the "Add NEW STATION" button
  2. enter a station name (say "aaa")
  3. quickly before the result show, change the text (say to "a")

Expected behavior The results of either the old text or the new text should show.

Screenshots Screenshot_1627467582

Device:

Additional context

skull591 commented 2 years ago

Oh, and I found that this happens only if you enter a text longer than three (thus the auto search starts), and then change the text to another one shorter than three. I think this may have something to do with the auto search logic.