mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 05:10:15 +02:00
@@ -538,6 +538,38 @@ class AddAppPageState extends State<AddAppPage> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
if (pickedSource != null && pickedSource!.enforceTrackOnly)
|
||||||
|
GeneratedForm(
|
||||||
|
key: Key(
|
||||||
|
'${pickedSource.runtimeType.toString()}-${pickedSource?.hostChanged.toString()}-${pickedSource?.hostIdenticalDespiteAnyChange.toString()}-appId'),
|
||||||
|
items: [
|
||||||
|
[
|
||||||
|
GeneratedFormTextField('appId',
|
||||||
|
label: tr('appId'),
|
||||||
|
required: false,
|
||||||
|
additionalValidators: [
|
||||||
|
(value) {
|
||||||
|
if (value == null || value.isEmpty) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
final isValid = RegExp(
|
||||||
|
r'^([A-Za-z]{1}[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*$')
|
||||||
|
.hasMatch(value);
|
||||||
|
if (!isValid) {
|
||||||
|
return tr('invalidInput');
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
]
|
||||||
|
],
|
||||||
|
onValueChanges: (values, valid, isBuilding) {
|
||||||
|
if (!isBuilding) {
|
||||||
|
setState(() {
|
||||||
|
additionalSettings['appId'] = values['appId'];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -571,7 +571,7 @@ abstract class AppSource {
|
|||||||
GeneratedFormSwitch('skipUpdateNotifications',
|
GeneratedFormSwitch('skipUpdateNotifications',
|
||||||
label: tr('skipUpdateNotifications'))
|
label: tr('skipUpdateNotifications'))
|
||||||
],
|
],
|
||||||
[GeneratedFormTextField('about', label: tr('about'), required: false)]
|
[GeneratedFormTextField('about', label: tr('about'), required: false)],
|
||||||
];
|
];
|
||||||
|
|
||||||
// Previous 2 variables combined into one at runtime for convenient usage
|
// Previous 2 variables combined into one at runtime for convenient usage
|
||||||
@@ -922,6 +922,9 @@ class SourceProvider {
|
|||||||
name = name.isNotEmpty ? name : apk.names.name;
|
name = name.isNotEmpty ? name : apk.names.name;
|
||||||
App finalApp = App(
|
App finalApp = App(
|
||||||
currentApp?.id ??
|
currentApp?.id ??
|
||||||
|
((additionalSettings['appId'] != null)
|
||||||
|
? additionalSettings['appId']
|
||||||
|
: null) ??
|
||||||
(!trackOnly &&
|
(!trackOnly &&
|
||||||
(!source.appIdInferIsOptional ||
|
(!source.appIdInferIsOptional ||
|
||||||
(source.appIdInferIsOptional && inferAppIdIfOptional))
|
(source.appIdInferIsOptional && inferAppIdIfOptional))
|
||||||
|
Reference in New Issue
Block a user