|
|
@ -7,6 +7,8 @@ package org.mozilla.fenix.tabtray
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.Context
|
|
|
|
import android.view.LayoutInflater
|
|
|
|
import android.view.LayoutInflater
|
|
|
|
import android.view.View
|
|
|
|
import android.view.View
|
|
|
|
|
|
|
|
import android.view.View.INVISIBLE
|
|
|
|
|
|
|
|
import android.view.View.VISIBLE
|
|
|
|
import android.view.ViewGroup
|
|
|
|
import android.view.ViewGroup
|
|
|
|
import android.view.accessibility.AccessibilityEvent
|
|
|
|
import android.view.accessibility.AccessibilityEvent
|
|
|
|
import androidx.annotation.IdRes
|
|
|
|
import androidx.annotation.IdRes
|
|
|
@ -125,12 +127,12 @@ class TabTrayView(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
|
|
|
|
behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
|
|
|
|
override fun onSlide(bottomSheet: View, slideOffset: Float) {
|
|
|
|
override fun onSlide(bottomSheet: View, slideOffset: Float) {
|
|
|
|
if (interactor.onModeRequested() is Mode.Normal && !hasAccessibilityEnabled) {
|
|
|
|
if (
|
|
|
|
if (slideOffset >= SLIDE_OFFSET) {
|
|
|
|
interactor.onModeRequested() is Mode.Normal &&
|
|
|
|
|
|
|
|
!hasAccessibilityEnabled &&
|
|
|
|
|
|
|
|
slideOffset >= SLIDE_OFFSET
|
|
|
|
|
|
|
|
) {
|
|
|
|
fabView.new_tab_button.show()
|
|
|
|
fabView.new_tab_button.show()
|
|
|
|
} else {
|
|
|
|
|
|
|
|
fabView.new_tab_button.hide()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -312,7 +314,7 @@ class TabTrayView(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
infoBanner?.apply {
|
|
|
|
infoBanner?.apply {
|
|
|
|
view.infoBanner.visibility = View.VISIBLE
|
|
|
|
view.infoBanner.visibility = VISIBLE
|
|
|
|
showBanner()
|
|
|
|
showBanner()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -579,9 +581,9 @@ class TabTrayView(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
view.tabsTray.visibility = if (hasNoTabs) {
|
|
|
|
view.tabsTray.visibility = if (hasNoTabs) {
|
|
|
|
View.INVISIBLE
|
|
|
|
INVISIBLE
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
View.VISIBLE
|
|
|
|
VISIBLE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
counter_text.text = updateTabCounter(browserState.normalTabs.size)
|
|
|
|
counter_text.text = updateTabCounter(browserState.normalTabs.size)
|
|
|
|