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

Bug 40063: Do not sort search engines alphabetically

parent 89af908e
......@@ -27,7 +27,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(
......@@ -123,7 +122,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