Skip to content

Commit f70a050

Browse files
committed
we don't want to crash if the bottom bar can't be shown because of an Illegal State Exception
1 parent 7caa5a7 commit f70a050

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,13 +1439,17 @@ class BrowserTabFragment : Fragment(), FindListener, CoroutineScope, DaxDialogLi
14391439
}
14401440

14411441
private fun showBottomBar(shouldAnimate: Boolean) {
1442-
if (shouldAnimate) {
1443-
bottomNavigationBar.show()
1444-
bottomNavigationBar.animateBarVisibility(isVisible = true)
1445-
} else {
1446-
bottomNavigationBar.postDelayed(KEYBOARD_DELAY) {
1442+
try {
1443+
if (shouldAnimate) {
14471444
bottomNavigationBar.show()
1445+
bottomNavigationBar.animateBarVisibility(isVisible = true)
1446+
} else {
1447+
bottomNavigationBar.postDelayed(KEYBOARD_DELAY) {
1448+
bottomNavigationBar.show()
1449+
}
14481450
}
1451+
} catch (e: Exception){
1452+
Timber.d("Could not show Bottom Bar, ${e.localizedMessage}")
14491453
}
14501454
}
14511455

0 commit comments

Comments
 (0)