GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 3229789d authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 40063: Do not sort search engines alphabetically

parent 89af908e
...@@ -27,7 +27,6 @@ import org.mozilla.fenix.BuildConfig ...@@ -27,7 +27,6 @@ import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.Config import org.mozilla.fenix.Config
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import java.util.Locale
@SuppressWarnings("TooManyFunctions") @SuppressWarnings("TooManyFunctions")
open class FenixSearchEngineProvider( open class FenixSearchEngineProvider(
...@@ -123,7 +122,7 @@ open class FenixSearchEngineProvider( ...@@ -123,7 +122,7 @@ open class FenixSearchEngineProvider(
engineList.copy( engineList.copy(
list = engineList.list.filter { list = engineList.list.filter {
installedIdentifiers.contains(it.identifier) installedIdentifiers.contains(it.identifier)
}.sortedBy { it.name.toLowerCase(Locale.getDefault()) }, },
default = engineList.default?.let { default = engineList.default?.let {
if (installedIdentifiers.contains(it.identifier)) { if (installedIdentifiers.contains(it.identifier)) {
it it
......
...@@ -32,7 +32,6 @@ import org.mozilla.fenix.ext.components ...@@ -32,7 +32,6 @@ import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.getRootView import org.mozilla.fenix.ext.getRootView
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.utils.allowUndo import org.mozilla.fenix.utils.allowUndo
import java.util.Locale
abstract class SearchEngineListPreference @JvmOverloads constructor( abstract class SearchEngineListPreference @JvmOverloads constructor(
context: Context, context: Context,
...@@ -116,7 +115,6 @@ abstract class SearchEngineListPreference @JvmOverloads constructor( ...@@ -116,7 +115,6 @@ abstract class SearchEngineListPreference @JvmOverloads constructor(
searchEngineList.list searchEngineList.list
.filter { it.identifier != searchEngineList.default?.identifier } .filter { it.identifier != searchEngineList.default?.identifier }
.sortedBy { it.name.toLowerCase(Locale.getDefault()) }
.forEachIndexed(setupSearchEngineItem) .forEachIndexed(setupSearchEngineItem)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment