mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 07:41:51 +01:00
SearchToolbar: Check initial search query to open keyboard by default (#9297)
This commit is contained in:
parent
88bf1a706b
commit
182e642cfc
@ -45,7 +45,6 @@ fun BrowseSourceToolbar(
|
|||||||
var selectingDisplayMode by remember { mutableStateOf(false) }
|
var selectingDisplayMode by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
SearchToolbar(
|
SearchToolbar(
|
||||||
initialShowKeyboard = searchQuery.isNullOrEmpty(),
|
|
||||||
navigateUp = navigateUp,
|
navigateUp = navigateUp,
|
||||||
titleContent = { AppBarTitle(title) },
|
titleContent = { AppBarTitle(title) },
|
||||||
searchQuery = searchQuery,
|
searchQuery = searchQuery,
|
||||||
|
@ -232,7 +232,6 @@ fun SearchToolbar(
|
|||||||
scrollBehavior: TopAppBarScrollBehavior? = null,
|
scrollBehavior: TopAppBarScrollBehavior? = null,
|
||||||
visualTransformation: VisualTransformation = VisualTransformation.None,
|
visualTransformation: VisualTransformation = VisualTransformation.None,
|
||||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||||
initialShowKeyboard: Boolean = true,
|
|
||||||
) {
|
) {
|
||||||
val focusRequester = remember { FocusRequester() }
|
val focusRequester = remember { FocusRequester() }
|
||||||
|
|
||||||
@ -257,7 +256,7 @@ fun SearchToolbar(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.focusRequester(focusRequester)
|
.focusRequester(focusRequester)
|
||||||
.runOnEnterKeyPressed(action = searchAndClearFocus)
|
.runOnEnterKeyPressed(action = searchAndClearFocus)
|
||||||
.showSoftKeyboard(initialShowKeyboard)
|
.showSoftKeyboard(remember { searchQuery.isEmpty() })
|
||||||
.clearFocusOnSoftKeyboardHide(),
|
.clearFocusOnSoftKeyboardHide(),
|
||||||
textStyle = MaterialTheme.typography.titleMedium.copy(
|
textStyle = MaterialTheme.typography.titleMedium.copy(
|
||||||
color = MaterialTheme.colorScheme.onBackground,
|
color = MaterialTheme.colorScheme.onBackground,
|
||||||
|
Loading…
Reference in New Issue
Block a user