Skip to content

Commit 325271b

Browse files
committed
proper handling of state
1 parent 6485543 commit 325271b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3386,8 +3386,6 @@ class BrowserTabFragment :
33863386

33873387
private fun ensureBrowserIsCompatibleWithContextualSheetState() {
33883388
val bottomSheetBehavior = BottomSheetBehavior.from(binding.duckAiContextualFragmentContainer)
3389-
bottomSheetBehavior.state = BottomSheetBehavior.STATE_HALF_EXPANDED
3390-
33913389
bottomSheetBehavior.addBottomSheetCallback(
33923390
object : BottomSheetBehavior.BottomSheetCallback() {
33933391
override fun onStateChanged(

duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ class DuckChatContextualFragment :
476476
val prompt = binding.inputField.text.toString()
477477
if (prompt.isNotEmpty()) {
478478
viewModel.onPromptSent(prompt)
479-
bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
480479
hideKeyboard(binding.inputField)
481480
}
482481
}
@@ -507,6 +506,7 @@ class DuckChatContextualFragment :
507506
}
508507

509508
is DuckChatContextualViewModel.Command.ChangeSheetState -> {
509+
logcat { "Duck.ai Contextual: ChangeSheetState ${command.newState}" }
510510
bottomSheetBehavior.state = command.newState
511511
}
512512
}

0 commit comments

Comments
 (0)