1
0
Fork 0

For #6848 - Sorts the search engine list without case sensitivity

Co-authored-by: Severin Rudie <Baron-Severin@users.noreply.github.com>
master
Jeff Boek 2019-12-04 14:45:46 -08:00
parent 1cc496a683
commit eb6e6b774f
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ 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,
@ -102,7 +103,7 @@ abstract class SearchEngineListPreference @JvmOverloads constructor(
searchEngineList.list
.filter { it.identifier != searchEngineList.default?.identifier }
.sortedBy { it.name }
.sortedBy { it.name.toLowerCase(Locale.getDefault()) }
.forEachIndexed(setupSearchEngineItem)
}