Always add Track-only apps with random ID (#1138)

This commit is contained in:
Imran Remtulla
2023-12-17 14:36:06 -05:00
parent d1955192ed
commit cd316b7138

View File

@@ -684,8 +684,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 ??
((!source.appIdInferIsOptional || (!trackOnly &&
(source.appIdInferIsOptional && inferAppIdIfOptional)) (!source.appIdInferIsOptional ||
(source.appIdInferIsOptional && inferAppIdIfOptional))
? await source.tryInferringAppId(standardUrl, ? await source.tryInferringAppId(standardUrl,
additionalSettings: additionalSettings) additionalSettings: additionalSettings)
: null) ?? : null) ??
@@ -705,8 +706,9 @@ class SourceProvider {
changeLog: apk.changeLog, changeLog: apk.changeLog,
overrideSource: overrideSource ?? currentApp?.overrideSource, overrideSource: overrideSource ?? currentApp?.overrideSource,
allowIdChange: currentApp?.allowIdChange ?? allowIdChange: currentApp?.allowIdChange ??
source.appIdInferIsOptional && trackOnly ||
inferAppIdIfOptional // Optional ID inferring may be incorrect - allow correction on first install (source.appIdInferIsOptional &&
inferAppIdIfOptional) // Optional ID inferring may be incorrect - allow correction on first install
); );
return source.endOfGetAppChanges(finalApp); return source.endOfGetAppChanges(finalApp);
} }