mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-11-01 22:03:29 +01:00
App name overrides more consistent (#450)
This commit is contained in:
@@ -94,8 +94,7 @@ class AppsPageState extends State<AppsPage> {
|
||||
.toList();
|
||||
|
||||
for (var t in nameTokens) {
|
||||
var name = app.installedInfo?.name ?? app.app.name;
|
||||
if (!name.toLowerCase().contains(t.toLowerCase())) {
|
||||
if (!app.name.toLowerCase().contains(t.toLowerCase())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -120,13 +119,11 @@ class AppsPageState extends State<AppsPage> {
|
||||
}).toList();
|
||||
|
||||
listedApps.sort((a, b) {
|
||||
var nameA = a.installedInfo?.name ?? a.app.name;
|
||||
var nameB = b.installedInfo?.name ?? b.app.name;
|
||||
int result = 0;
|
||||
if (settingsProvider.sortColumn == SortColumnSettings.authorName) {
|
||||
result = (a.app.author + nameA).compareTo(b.app.author + nameB);
|
||||
result = (a.app.author + a.name).compareTo(b.app.author + b.name);
|
||||
} else if (settingsProvider.sortColumn == SortColumnSettings.nameAuthor) {
|
||||
result = (nameA + a.app.author).compareTo(nameB + b.app.author);
|
||||
result = (a.name + a.app.author).compareTo(b.name + b.app.author);
|
||||
} else if (settingsProvider.sortColumn ==
|
||||
SortColumnSettings.releaseDate) {
|
||||
result = (a.app.releaseDate)?.compareTo(
|
||||
@@ -481,8 +478,7 @@ class AppsPageState extends State<AppsPage> {
|
||||
leading: getAppIcon(index),
|
||||
title: Text(
|
||||
maxLines: 1,
|
||||
listedApps[index].installedInfo?.name ??
|
||||
listedApps[index].app.name,
|
||||
listedApps[index].name,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontWeight: listedApps[index].app.pinned
|
||||
|
||||
Reference in New Issue
Block a user