mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-26 11:13:46 +01:00
App name overrides more consistent (#450)
This commit is contained in:
@@ -153,7 +153,7 @@ class _AppPageState extends State<AppPage> {
|
||||
height: 25,
|
||||
),
|
||||
Text(
|
||||
app?.app.name ?? tr('app'),
|
||||
app?.name ?? tr('app'),
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.displayLarge,
|
||||
),
|
||||
@@ -386,7 +386,7 @@ class _AppPageState extends State<AppPage> {
|
||||
scrollable: true,
|
||||
content: getInfoColumn(),
|
||||
title: Text(
|
||||
'${app.app.name} ${tr('byX', args: [
|
||||
'${app.name} ${tr('byX', args: [
|
||||
app.app.author
|
||||
])}'),
|
||||
actions: [
|
||||
|
||||
@@ -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