Compare commits

..

3 Commits

Author SHA1 Message Date
4fc913eae1 chore(release): 1.19.0-dev.19 [skip ci]
# [1.19.0-dev.19](https://github.com/ReVanced/revanced-manager/compare/v1.19.0-dev.18...v1.19.0-dev.19) (2024-03-04)

### Bug Fixes

* Fix patched APKs exports after installation ([1200360](1200360588))

### Features

* Use more appropriate progress values ([2d7026a](2d7026ac7a))
2024-03-04 12:51:06 +00:00
2d7026ac7a feat: Use more appropriate progress values 2024-03-04 13:43:35 +01:00
1200360588 fix: Fix patched APKs exports after installation 2024-03-04 13:43:34 +01:00
5 changed files with 11 additions and 8 deletions

View File

@ -285,7 +285,7 @@ class MainActivity : FlutterActivity() {
)
if (cancel(patcher::close)) return@Thread
updateProgress(0.1, "Loading patches...", "Loading patches")
updateProgress(0.02, "Loading patches...", "Loading patches")
val patches = patches.filter { patch ->
val isCompatible = patch.compatiblePackages?.any {
@ -303,7 +303,7 @@ class MainActivity : FlutterActivity() {
}.toSet()
if (cancel(patcher::close)) return@Thread
updateProgress(0.15, "Executing...", "")
updateProgress(0.05, "Executing...", "")
val patcherResult = patcher.use {
patcher.apply {
@ -315,7 +315,7 @@ class MainActivity : FlutterActivity() {
// Update the progress bar every time a patch is executed from 0.15 to 0.7
val totalPatchesCount = patches.size
val progressStep = 0.55 / totalPatchesCount
var progress = 0.15
var progress = 0.05
patcher.apply(false).collect(FlowCollector { patchResult: PatchResult ->
if (cancel(patcher::close)) return@FlowCollector

View File

@ -669,7 +669,7 @@ class ManagerAPI {
);
}
Future<void> rePatchedSavedApps() async {
Future<void> reAssessPatchedApps() async {
final List<PatchedApplication> patchedApps = getPatchedApps();
// Remove apps that are not installed anymore.

View File

@ -43,7 +43,7 @@ class HomeViewModel extends BaseViewModel {
File? downloadedApk;
Future<void> initialize(BuildContext context) async {
_managerAPI.rePatchedSavedApps().then((_) => _getPatchedApps());
_managerAPI.reAssessPatchedApps().then((_) => getPatchedApps());
_currentManagerVersion = await _managerAPI.getCurrentManagerVersion();
if (!_managerAPI.getDownloadConsent()) {
await showDownloadConsent(context);
@ -122,7 +122,7 @@ class HomeViewModel extends BaseViewModel {
locator<NavigationViewModel>().setIndex(1);
}
void _getPatchedApps() {
void getPatchedApps() {
patchedInstalledApps = _managerAPI.getPatchedApps().toList();
notifyListeners();
}

View File

@ -465,7 +465,10 @@ class InstallerViewModel extends BaseViewModel {
}
await _managerAPI.savePatchedApp(_app);
await locator<HomeViewModel>().initialize(context);
_managerAPI
.reAssessPatchedApps()
.then((_) => locator<HomeViewModel>().getPatchedApps());
update(1.0, 'Installed', 'Installed');
} else if (response == 3) {

View File

@ -4,7 +4,7 @@ homepage: https://github.com/ReVanced/revanced-manager
publish_to: 'none'
version: 1.19.0-dev.18+101900018
version: 1.19.0-dev.19+101900019
environment:
sdk: '>=3.0.0 <4.0.0'