new search action and sorting of actions

This commit is contained in:
Fabian Freund committed 2025-05-03 23:44:15 +02:00
1 parent 10b2e46984
commit f18b31042c
3 files changed
+29 -14

No files matched your search

@@ -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)