fix(discover): genre card from search results did nothing — openGenre reloaded rankings but the view stayed in the Results branch so the update was invisible. Clear the query and return to Idle rankings view, showing 'Top in <genre>'.
This commit is contained in:
parent
4c63421400
commit
31d47f4cb5
1 changed files with 4 additions and 0 deletions
|
|
@ -315,6 +315,10 @@ class WavlakeViewModel @Inject constructor(
|
|||
|
||||
/** Jump the Stations tab filtered to this genre (Discover genre hit). */
|
||||
fun openGenre(genre: String) {
|
||||
// Reached from a search-result genre card: the rankings live in the
|
||||
// Idle branch, so drop the query or the reload would stay invisible.
|
||||
_searchQuery.value = ""
|
||||
_searchState.value = WavlakeSearchState.Idle
|
||||
_rankingsGenre.value = genre
|
||||
viewModelScope.launch {
|
||||
_rankingsLoading.value = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue