parent
6b4c160d18
commit
8855af2234
|
@ -489,21 +489,6 @@ class BrowserFragment : Fragment(), BackHandler {
|
||||||
trackToolbarItemInteraction(it)
|
trackToolbarItemInteraction(it)
|
||||||
handleToolbarItemInteraction(it)
|
handleToolbarItemInteraction(it)
|
||||||
}
|
}
|
||||||
is SearchAction.ToolbarLongClicked -> {
|
|
||||||
getSessionById()?.let { session ->
|
|
||||||
session.copyUrl(requireContext())
|
|
||||||
view?.let {
|
|
||||||
val snackbar = FenixSnackbar.make(it, Snackbar.LENGTH_LONG)
|
|
||||||
.setText(resources.getString(R.string.url_copied))
|
|
||||||
|
|
||||||
if (!session.isCustomTabSession()) {
|
|
||||||
snackbar.anchorView = nestedScrollQuickAction
|
|
||||||
}
|
|
||||||
|
|
||||||
snackbar.show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,6 @@ sealed class SearchAction : Action {
|
||||||
data class UrlCommitted(val url: String, val session: String?, val engine: SearchEngine? = null) : SearchAction()
|
data class UrlCommitted(val url: String, val session: String?, val engine: SearchEngine? = null) : SearchAction()
|
||||||
data class TextChanged(val query: String) : SearchAction()
|
data class TextChanged(val query: String) : SearchAction()
|
||||||
object ToolbarClicked : SearchAction()
|
object ToolbarClicked : SearchAction()
|
||||||
object ToolbarLongClicked : SearchAction()
|
|
||||||
data class ToolbarMenuItemTapped(val item: ToolbarMenu.Item) : SearchAction()
|
data class ToolbarMenuItemTapped(val item: ToolbarMenu.Item) : SearchAction()
|
||||||
object EditingCanceled : SearchAction()
|
object EditingCanceled : SearchAction()
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,11 +86,6 @@ class ToolbarUIView(
|
||||||
actionEmitter.onNext(SearchAction.TextChanged(text))
|
actionEmitter.onNext(SearchAction.TextChanged(text))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
setOnUrlLongClickListener {
|
|
||||||
actionEmitter.onNext(SearchAction.ToolbarLongClicked)
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
with(view.context) {
|
with(view.context) {
|
||||||
|
|
Loading…
Reference in New Issue