mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
feat: Show changelogs from the latest to the last used patches version (#2219)
This commit is contained in:
@ -478,14 +478,8 @@ class HomeViewModel extends BaseViewModel {
|
||||
);
|
||||
}
|
||||
|
||||
Future<String?> getManagerChangelogs() {
|
||||
return _githubAPI.getManagerChangelogs();
|
||||
}
|
||||
|
||||
Future<String?> getLatestPatchesChangelog() async {
|
||||
final release =
|
||||
await _githubAPI.getLatestRelease(_managerAPI.getPatchesRepo());
|
||||
return release?['body'];
|
||||
Future<String?> getChangelogs(bool isPatches) {
|
||||
return _githubAPI.getChangelogs(isPatches);
|
||||
}
|
||||
|
||||
Future<String?> getLatestPatchesReleaseTime() {
|
||||
|
@ -159,6 +159,9 @@ class InstallerViewModel extends BaseViewModel {
|
||||
_app.packageName,
|
||||
);
|
||||
await _managerAPI.setUsedPatches(_patches, _app.packageName);
|
||||
_managerAPI.setLastUsedPatchesVersion(
|
||||
version: _managerAPI.patchesVersion,
|
||||
);
|
||||
} else if (value == -100.0) {
|
||||
isPatching = false;
|
||||
hasErrors = true;
|
||||
@ -197,7 +200,9 @@ class InstallerViewModel extends BaseViewModel {
|
||||
_app.patchedFilePath = _patcherAPI.outFile!.path;
|
||||
}
|
||||
final homeViewModel = locator<HomeViewModel>();
|
||||
_managerAPI.reAssessPatchedApps().then((_) => homeViewModel.getPatchedApps());
|
||||
_managerAPI
|
||||
.reAssessPatchedApps()
|
||||
.then((_) => homeViewModel.getPatchedApps());
|
||||
} on Exception catch (e) {
|
||||
update(
|
||||
-100.0,
|
||||
|
@ -129,6 +129,7 @@ class SManageSources extends BaseViewModel {
|
||||
);
|
||||
_managerAPI.setCurrentPatchesVersion('0.0.0');
|
||||
_managerAPI.setCurrentIntegrationsVersion('0.0.0');
|
||||
_managerAPI.setLastUsedPatchesVersion();
|
||||
_toast.showBottom(t.settingsView.restartAppForChanges);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
@ -57,6 +57,7 @@ class SettingsViewModel extends BaseViewModel {
|
||||
_managerAPI.useAlternativeSources(value);
|
||||
_managerAPI.setCurrentPatchesVersion('0.0.0');
|
||||
_managerAPI.setCurrentIntegrationsVersion('0.0.0');
|
||||
_managerAPI.setLastUsedPatchesVersion();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user