fix: Make sure we are getting app from from storage when selection is from storage

This commit is contained in:
Alberto Ponces 2022-09-23 15:21:58 +01:00
parent c0f743df89
commit 4609ed9eba

View File

@ -42,7 +42,12 @@ class PatcherViewModel extends BaseViewModel {
bool needsResourcePatching = bool needsResourcePatching =
await _patcherAPI.needsResourcePatching(selectedPatches); await _patcherAPI.needsResourcePatching(selectedPatches);
if (needsResourcePatching && selectedApp != null) { if (needsResourcePatching && selectedApp != null) {
Application? app = await DeviceApps.getApp(selectedApp!.packageName); Application? app;
if (selectedApp!.isFromStorage) {
app = await DeviceApps.getAppFromStorage(selectedApp!.apkFilePath);
} else {
app = await DeviceApps.getApp(selectedApp!.packageName);
}
if (app != null && app.isSplit) { if (app != null && app.isSplit) {
return false; return false;
} }