Added an (experimental) Source override option for URLs that work with an existing Source but use a custom host (#271, #393) (#502)

This commit is contained in:
Imran Remtulla
2023-04-29 23:50:12 -04:00
committed by GitHub
parent 3e4d5c26ac
commit 392554123b
32 changed files with 270 additions and 158 deletions

View File

@@ -111,7 +111,11 @@ class AppsPageState extends State<AppsPage> {
return false;
}
if (filter.sourceFilter.isNotEmpty &&
sourceProvider.getSource(app.app.url).runtimeType.toString() !=
sourceProvider
.getSource(app.app.url,
overrideSource: app.app.overrideSource)
.runtimeType
.toString() !=
filter.sourceFilter) {
return false;
}
@@ -306,8 +310,9 @@ class AppsPageState extends State<AppsPage> {
}
getChangeLogFn(int appIndex) {
AppSource appSource =
SourceProvider().getSource(listedApps[appIndex].app.url);
AppSource appSource = SourceProvider().getSource(
listedApps[appIndex].app.url,
overrideSource: listedApps[appIndex].app.overrideSource);
String? changesUrl =
appSource.changeLogPageFromStandardUrl(listedApps[appIndex].app.url);
String? changeLog = listedApps[appIndex].app.changeLog;