mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
search: require three characters and play songs in album context
Drop the library-wide instr fallback: below three characters the cross-type search now returns nothing instead of scanning every table, and the screen asks for more input. Lock in that a song result plays its album context rather than a search queue.
This commit is contained in:
@@ -37,6 +37,7 @@ import com.subtracks.data.model.Artist
|
||||
import com.subtracks.data.model.CoverArtRef
|
||||
import com.subtracks.data.model.Playlist
|
||||
import com.subtracks.data.model.Song
|
||||
import com.subtracks.data.repo.SEARCH_MIN_LENGTH
|
||||
import com.subtracks.data.source.StarType
|
||||
import com.subtracks.playback.PlaybackController
|
||||
import com.subtracks.ui.components.ContextMenuHost
|
||||
@@ -144,9 +145,9 @@ fun SearchScreen(
|
||||
},
|
||||
) { padding ->
|
||||
when {
|
||||
query.isBlank() -> {
|
||||
query.length < SEARCH_MIN_LENGTH -> {
|
||||
EmptyState(
|
||||
text = "Search for songs, albums, artists and playlists.",
|
||||
text = "Type at least $SEARCH_MIN_LENGTH characters to search.",
|
||||
modifier = Modifier.padding(padding),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user