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 04c2a951 authored by Alex Catarineu's avatar Alex Catarineu

Bug 40063: Do not sort search engines alphabetically

parent c211ca85
Pipeline #1170 failed with stages
in 12 minutes and 42 seconds
......@@ -26,7 +26,6 @@ import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.Config
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
import java.util.Locale
@SuppressWarnings("TooManyFunctions")
open class FenixSearchEngineProvider(
......@@ -112,7 +111,7 @@ open class FenixSearchEngineProvider(
engineList.copy(
list = engineList.list.filter {
installedIdentifiers.contains(it.identifier)
}.sortedBy { it.name.toLowerCase(Locale.getDefault()) },
},
default = engineList.default?.let {
if (installedIdentifiers.contains(it.identifier)) {
it
......
......@@ -32,7 +32,6 @@ import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.getRootView
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.utils.allowUndo
import java.util.Locale
abstract class SearchEngineListPreference @JvmOverloads constructor(
context: Context,
......@@ -116,7 +115,6 @@ abstract class SearchEngineListPreference @JvmOverloads constructor(
searchEngineList.list
.filter { it.identifier != searchEngineList.default?.identifier }
.sortedBy { it.name.toLowerCase(Locale.getDefault()) }
.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