mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-23 09:29:41 +02:00
F-Droid repo search bugfix (#1681)
This commit is contained in:
@@ -86,6 +86,27 @@ class FDroidRepo extends AppSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void runOnAddAppInputChange(String userInput) {
|
||||||
|
this.additionalSourceAppSpecificSettingFormItems =
|
||||||
|
this.additionalSourceAppSpecificSettingFormItems.map((row) {
|
||||||
|
row = row.map((item) {
|
||||||
|
if (item.key == 'appIdOrName') {
|
||||||
|
try {
|
||||||
|
var appId = Uri.parse(userInput).queryParameters['appId'];
|
||||||
|
if (appId != null && item is GeneratedFormTextField) {
|
||||||
|
item.required = false;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
}).toList();
|
||||||
|
return row;
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
App endOfGetAppChanges(App app) {
|
App endOfGetAppChanges(App app) {
|
||||||
var uri = Uri.parse(app.url);
|
var uri = Uri.parse(app.url);
|
||||||
|
@@ -71,6 +71,7 @@ class AddAppPageState extends State<AddAppPage> {
|
|||||||
if (pickedSource.runtimeType != source.runtimeType ||
|
if (pickedSource.runtimeType != source.runtimeType ||
|
||||||
(prevHost != null && prevHost != source?.hosts[0])) {
|
(prevHost != null && prevHost != source?.hosts[0])) {
|
||||||
pickedSource = source;
|
pickedSource = source;
|
||||||
|
pickedSource?.runOnAddAppInputChange(userInput);
|
||||||
additionalSettings = source != null
|
additionalSettings = source != null
|
||||||
? getDefaultValuesFromFormItems(
|
? getDefaultValuesFromFormItems(
|
||||||
source.combinedAppSpecificSettingFormItems)
|
source.combinedAppSpecificSettingFormItems)
|
||||||
|
@@ -463,6 +463,10 @@ abstract class AppSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void runOnAddAppInputChange(String inputUrl) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
String sourceSpecificStandardizeURL(String url) {
|
String sourceSpecificStandardizeURL(String url) {
|
||||||
throw NotImplementedError();
|
throw NotImplementedError();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user