Added Steam as a Source (#159) + Bugfixes

This commit is contained in:
Imran Remtulla
2022-12-16 19:26:07 -05:00
parent 2b6a16637e
commit a68d49c71c
9 changed files with 96 additions and 9 deletions

View File

@@ -274,9 +274,14 @@ class AppsProvider with ChangeNotifier {
);
});
}
getHost(String url) {
var temp = Uri.parse(url).host.split('.');
return temp.sublist(temp.length - 2).join('.');
}
// If the picked APK comes from an origin different from the source, get user confirmation (if context provided)
if (apkUrl != null &&
Uri.parse(apkUrl).origin != Uri.parse(app.url).origin &&
getHost(apkUrl) != getHost(app.url) &&
context != null) {
if (await showDialog(
context: context,