MM2-0 / Kvaesitso

A search-focused Android launcher
https://kvaesitso.mm20.de/
GNU General Public License v3.0
2.51k stars 86 forks source link

`SearchVM`, `SearchService`: improve search UX by reducing flickering #1117

Open Sir-Photch opened 3 weeks ago

Sir-Photch commented 3 weeks ago

This PR closes #617 and improves search UX by not redrawing search results until there are actual results by any SearchableRepository. This "fixes" the "flickering" that would otherwise occur when searching:

https://github.com/user-attachments/assets/723dbf1f-120a-4d1a-ad5a-fa6f3243b304

I also went and replaced MutableStateOf({Int,Float}) to the respective Mutable{Int,Float}StateOf that I found on the way, for good measure.

Now, I haven't tested this much, so I'm not sure whether or not this introduces any regressions. But I think the result of an UI that does not flicker when typing is quite promising. Let me know what you think.

And sorry for that messed up commit-history. :sweat_smile: