fix: TikTok integrations and settings patches should be merged if needed

This commit is contained in:
Alberto Ponces 2022-09-22 14:02:07 +01:00
parent f0f934f6a1
commit f9865166b0

View File

@ -89,19 +89,25 @@ class PatcherAPI {
Future<bool> needsIntegrations(List<Patch> selectedPatches) async { Future<bool> needsIntegrations(List<Patch> selectedPatches) async {
return selectedPatches.any( return selectedPatches.any(
(patch) => patch.dependencies.contains('integrations'), (patch) => patch.dependencies.any(
(dep) => dep.contains('integrations'),
),
); );
} }
Future<bool> needsResourcePatching(List<Patch> selectedPatches) async { Future<bool> needsResourcePatching(List<Patch> selectedPatches) async {
return selectedPatches.any( return selectedPatches.any(
(patch) => patch.dependencies.any((dep) => dep.contains('resource-')), (patch) => patch.dependencies.any(
(dep) => dep.contains('resource-'),
),
); );
} }
Future<bool> needsSettingsPatch(List<Patch> selectedPatches) async { Future<bool> needsSettingsPatch(List<Patch> selectedPatches) async {
return selectedPatches.any( return selectedPatches.any(
(patch) => patch.dependencies.contains('settings'), (patch) => patch.dependencies.any(
(dep) => dep.contains('settings'),
),
); );
} }