fix: Update package name if MicroG was applied

This commit is contained in:
Alberto Ponces
2022-09-14 23:40:08 +01:00
parent 9f3a30d9f2
commit cdb492910c
3 changed files with 8 additions and 3 deletions

View File

@ -142,6 +142,13 @@ class InstallerViewModel extends BaseViewModel {
update(1.0, 'Installed!', 'Installed!');
_app.patchDate = DateTime.now();
_app.appliedPatches = _patches.map((p) => p.name).toList();
bool hasMicroG = _patches.any((p) => p.name.endsWith('microg-support'));
if (hasMicroG) {
_app.packageName = _app.packageName.replaceFirst(
'com.google.',
'app.revanced.',
);
}
await _managerAPI.savePatchedApp(_app);
}
}