mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-20 13:19:28 +02:00
Sort no longer case-sensitive (#450)
This commit is contained in:
@@ -121,9 +121,11 @@ class AppsPageState extends State<AppsPage> {
|
|||||||
listedApps.sort((a, b) {
|
listedApps.sort((a, b) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (settingsProvider.sortColumn == SortColumnSettings.authorName) {
|
if (settingsProvider.sortColumn == SortColumnSettings.authorName) {
|
||||||
result = (a.app.author + a.name).compareTo(b.app.author + b.name);
|
result = ((a.app.author + a.name).toLowerCase())
|
||||||
|
.compareTo((b.app.author + b.name).toLowerCase());
|
||||||
} else if (settingsProvider.sortColumn == SortColumnSettings.nameAuthor) {
|
} else if (settingsProvider.sortColumn == SortColumnSettings.nameAuthor) {
|
||||||
result = (a.name + a.app.author).compareTo(b.name + b.app.author);
|
result = ((a.name + a.app.author).toLowerCase())
|
||||||
|
.compareTo((b.name + b.app.author).toLowerCase());
|
||||||
} else if (settingsProvider.sortColumn ==
|
} else if (settingsProvider.sortColumn ==
|
||||||
SortColumnSettings.releaseDate) {
|
SortColumnSettings.releaseDate) {
|
||||||
result = (a.app.releaseDate)?.compareTo(
|
result = (a.app.releaseDate)?.compareTo(
|
||||||
@@ -203,7 +205,7 @@ class AppsPageState extends State<AppsPage> {
|
|||||||
var listedCategories = getListedCategories();
|
var listedCategories = getListedCategories();
|
||||||
listedCategories.sort((a, b) {
|
listedCategories.sort((a, b) {
|
||||||
return a != null && b != null
|
return a != null && b != null
|
||||||
? a.compareTo(b)
|
? a.toLowerCase().compareTo(b.toLowerCase())
|
||||||
: a == null
|
: a == null
|
||||||
? 1
|
? 1
|
||||||
: -1;
|
: -1;
|
||||||
|
Reference in New Issue
Block a user