Skip to content

Commit

Permalink
fix select all not respecting searched songs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lambada10 committed Jul 15, 2024
1 parent 695c43d commit d8e1b5f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ fun HomeScreen(
}
var ableToSelect by remember { mutableStateOf<List<Song>?>(null) }

val searched = viewModel.searchResults.collectAsState()
val filtered = viewModel.cachedFilteredSongs.collectAsState()

ableToSelect = when {
searched.value.isNotEmpty() -> searched.value
filtered.value.isNotEmpty() -> filtered.value
else -> allSongs
}
Expand Down

0 comments on commit d8e1b5f

Please sign in to comment.