parent
388581f76f
commit
98a40aabd7
|
@ -265,7 +265,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
|||
|
||||
findInPageIntegration.set(
|
||||
feature = FindInPageIntegration(
|
||||
requireComponents.core.sessionManager, view.findInPageView, view.engineView
|
||||
requireComponents.core.sessionManager, view.findInPageView, view.engineView, toolbar
|
||||
),
|
||||
owner = this,
|
||||
view = view
|
||||
|
|
|
@ -22,7 +22,8 @@ import org.mozilla.fenix.test.Mockable
|
|||
class FindInPageIntegration(
|
||||
private val sessionManager: SessionManager,
|
||||
private val view: FindInPageView,
|
||||
engineView: EngineView
|
||||
engineView: EngineView,
|
||||
private val toolbar: BrowserToolbar
|
||||
) : LifecycleAwareFeature, BackHandler {
|
||||
private val feature = FindInPageFeature(sessionManager, view, engineView, ::onClose)
|
||||
|
||||
|
@ -43,12 +44,14 @@ class FindInPageIntegration(
|
|||
}
|
||||
|
||||
private fun onClose() {
|
||||
toolbar.visibility = View.VISIBLE
|
||||
view.asView().visibility = View.GONE
|
||||
}
|
||||
|
||||
private fun launch() {
|
||||
val session = sessionManager.selectedSession ?: return
|
||||
|
||||
toolbar.visibility = View.GONE
|
||||
view.asView().visibility = View.VISIBLE
|
||||
feature.bind(session)
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
app:findInPageNoMatchesTextColor="?attr/destructive"
|
||||
app:layout_behavior="org.mozilla.fenix.components.FindInPageBarBehavior"
|
||||
mozac:findInPageButtonsTint="?primaryText"
|
||||
mozac:findInPageResultCountTextColor="?primaryText" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue