File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
app/src/main/java/com/duckduckgo/app/browser Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -844,7 +844,7 @@ open class BrowserActivity : DuckDuckGoActivity() {
844844 animateDuckAiFragmentOut {
845845 val transaction = supportFragmentManager.beginTransaction()
846846 transaction.hide(fragment)
847- transaction.commit()
847+ transaction.commitAllowingStateLoss() // allow state loss in case the transition finishes after onSaveInstanceState
848848 }
849849 }
850850 }
@@ -891,6 +891,9 @@ open class BrowserActivity : DuckDuckGoActivity() {
891891 } else {
892892 showDuckAiFragmentImmediately()
893893 }
894+ } else if (! binding.duckAiFragmentContainer.isVisible) {
895+ // in case of lost fragment manager state, ensure the container is visible and show it immediately if not
896+ showDuckAiFragmentImmediately()
894897 }
895898 }
896899
You can’t perform that action at this time.
0 commit comments