new search action and sorting of actions
This commit is contained in:
+7
-1
@@ -109,7 +109,13 @@ class GeckoBrowserApiImpl : GeckoBrowserApi {
|
||||
private fun setupGeckoEngine() {
|
||||
val selectionActionEvents = GeckoSelectionActionEvents(_flutterPluginBinding.binaryMessenger)
|
||||
|
||||
val selectionActionDelegate = DefaultSelectionActionDelegate(selectionActionEvents)
|
||||
val selectionActionDelegate = DefaultSelectionActionDelegate(selectionActionEvents) { actions ->
|
||||
val processTextAction = "android.intent.action.PROCESS_TEXT"
|
||||
val withoutProcessText = actions.filter { it != processTextAction }.toTypedArray()
|
||||
val processTextActions = actions.filter { it == processTextAction }.toTypedArray()
|
||||
|
||||
withoutProcessText + processTextActions
|
||||
}
|
||||
|
||||
val readerViewController =
|
||||
ReaderViewController(_flutterPluginBinding.binaryMessenger)
|
||||
|
||||
+9
@@ -33,6 +33,15 @@ class EmailAction extends BaseSelectionAction {
|
||||
);
|
||||
}
|
||||
|
||||
class DefaultSearchAction extends BaseSelectionAction {
|
||||
DefaultSearchAction(PerformAction action)
|
||||
: super(
|
||||
id: 'CUSTOM_CONTEXT_MENU_SEARCH_DEFAULT',
|
||||
title: 'Web Search',
|
||||
performAction: action,
|
||||
);
|
||||
}
|
||||
|
||||
class SearchAction extends BaseSelectionAction {
|
||||
SearchAction(PerformAction action)
|
||||
: super(
|
||||
|
||||
Reference in New Issue
Block a user