Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
fenix
Commits
3229789d
Commit
3229789d
authored
Sep 30, 2020
by
Alex Catarineu
Committed by
Matthew Finkel
Oct 23, 2020
Browse files
Bug 40063: Do not sort search engines alphabetically
parent
89af908e
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/components/searchengine/FenixSearchEngineProvider.kt
View file @
3229789d
...
...
@@ -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
...
...
app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineListPreference.kt
View file @
3229789d
...
...
@@ -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
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment