Skip to content

Commit f20b17e

Browse files
authored
Hide Return floating button in Duck.ai when input is empty (#6860)
Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1211455649223884?focus=true ### Description - Hides the return button on the Duck.ai tab on the Input Screen if nothing has been entered. ### Steps to test this PR - [x] Open the Input Screen and go to the Duck.ai tab - [x] Verify that the return button is hidden - [x] Type something - [x] Verify that the return button is shown
1 parent e246a67 commit f20b17e

File tree

2 files changed

+963
-825
lines changed

2 files changed

+963
-825
lines changed

duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/viewmodel/InputScreenViewModel.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@ class InputScreenViewModel @AssistedInject constructor(
363363
fun onChatInputTextChanged(query: String) {
364364
chatInputTextState.value = query.trim()
365365
_visibilityState.update {
366-
it.copy(showChatLogo = (query == initialSearchInputText && !it.autoCompleteSuggestionsVisible) || query.isEmpty())
366+
it.copy(
367+
showChatLogo = (query == initialSearchInputText && !it.autoCompleteSuggestionsVisible) || query.isEmpty(),
368+
newLineButtonVisible = query.isNotBlank(),
369+
)
367370
}
368371
}
369372

0 commit comments

Comments
 (0)