Infer GitHub App ID where possible

This commit is contained in:
Imran Remtulla
2023-05-27 20:36:29 -04:00
parent 4c6303f783
commit 833ece1ef5
6 changed files with 62 additions and 17 deletions

View File

@@ -434,8 +434,8 @@ abstract class AppSource {
throw NotImplementedError();
}
String? tryInferringAppId(String standardUrl,
{Map<String, dynamic> additionalSettings = const {}}) {
Future<String?> tryInferringAppId(String standardUrl,
{Map<String, dynamic> additionalSettings = const {}}) async {
return null;
}
}
@@ -592,7 +592,7 @@ class SourceProvider {
: apk.names.name[0].toUpperCase() + apk.names.name.substring(1);
return App(
currentApp?.id ??
source.tryInferringAppId(standardUrl,
await source.tryInferringAppId(standardUrl,
additionalSettings: additionalSettings) ??
generateTempID(standardUrl, additionalSettings),
standardUrl,