2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-11 13:11:01 +00:00

For #2035 - Fixes a11y and loading toolbar behavior logic (#2243)

This commit is contained in:
Emily Kager 2019-05-02 14:28:57 -07:00 committed by Colin Lee
parent 7ab19a71fc
commit aa6d36dda9

View File

@ -690,13 +690,11 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope,
// Stop toolbar from collapsing if TalkBack is enabled or page is loading // Stop toolbar from collapsing if TalkBack is enabled or page is loading
val accessibilityManager = context val accessibilityManager = context
?.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager ?.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager
if (accessibilityManager?.isTouchExplorationEnabled == false) { if (loading || accessibilityManager?.isTouchExplorationEnabled == true) {
if (!loading) {
behavior = BrowserToolbarBottomBehavior(context, null)
} else {
(behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView) (behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView)
behavior = null behavior = null
} } else {
behavior = BrowserToolbarBottomBehavior(context, null)
} }
} }
} }