This commit is contained in:
vfsfitvnm
2022-09-28 16:38:51 +02:00
parent 752b29c93a
commit c03a3bcc03
5 changed files with 75 additions and 42 deletions

View File

@@ -62,10 +62,12 @@ fun LocalSongSearch(
stateSaver = DetailedSongListSaver,
key1 = textFieldValue.text
) {
Database
.search("%${textFieldValue.text}%")
.flowOn(Dispatchers.IO)
.collect { value = it }
if (textFieldValue.text.length > 1) {
Database
.search("%${textFieldValue.text}%")
.flowOn(Dispatchers.IO)
.collect { value = it }
}
}
val thumbnailSize = Dimensions.thumbnails.song.px

View File

@@ -111,11 +111,6 @@ fun OnlineSearch(
FocusRequester()
}
LaunchedEffect(Unit) {
delay(300)
focusRequester.requestFocus()
}
LazyColumn(
contentPadding = LocalPlayerAwarePaddingValues.current,
modifier = Modifier
@@ -334,4 +329,9 @@ fun OnlineSearch(
}
}
}
LaunchedEffect(Unit) {
delay(300)
focusRequester.requestFocus()
}
}