Allow users to override author name (#1792)

This commit is contained in:
Imran Remtulla
2025-02-22 20:01:59 -05:00
parent 9a58643088
commit b3af899ba1
4 changed files with 18 additions and 7 deletions

View File

@@ -53,6 +53,7 @@ class AppInMemory {
AppInMemory(app.deepCopy(), downloadProgress, installedInfo, icon);
String get name => app.overrideName ?? app.finalName;
String get author => app.overrideAuthor ?? app.finalAuthor;
}
class DownloadedApk {

View File

@@ -330,6 +330,15 @@ class App {
return overrideName ?? name;
}
String? get overrideAuthor =>
additionalSettings['appAuthor']?.toString().trim().isNotEmpty == true
? additionalSettings['appAuthor']
: null;
String get finalAuthor {
return overrideAuthor ?? author;
}
App deepCopy() => App(
id,
url,
@@ -622,6 +631,7 @@ abstract class AppSource {
label: tr('autoApkFilterByArch'), defaultValue: true)
],
[GeneratedFormTextField('appName', label: tr('appName'), required: false)],
[GeneratedFormTextField('appAuthor', label: tr('author'), required: false)],
[
GeneratedFormSwitch('shizukuPretendToBeGooglePlay',
label: tr('shizukuPretendToBeGooglePlay'), defaultValue: false)