mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat: Save last patched app (#1414)
Co-authored-by: aAbed <39409020+TheAabedKhan@users.noreply.github.com> Co-authored-by: Ushie <ushiekane@gmail.com> Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de> Co-authored-by: Mr. X <79870712+n30mrx@users.noreply.github.com> Co-authored-by: festry0 <153519925+festry0@users.noreply.github.com>
This commit is contained in:
@ -35,6 +35,7 @@ class HomeViewModel extends BaseViewModel {
|
||||
final Toast _toast = locator<Toast>();
|
||||
final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
|
||||
bool showUpdatableApps = false;
|
||||
PatchedApplication? lastPatchedApp;
|
||||
bool releaseBuild = false;
|
||||
List<PatchedApplication> patchedInstalledApps = [];
|
||||
String _currentManagerVersion = '';
|
||||
@ -102,10 +103,10 @@ class HomeViewModel extends BaseViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
void navigateToAppInfo(PatchedApplication app) {
|
||||
void navigateToAppInfo(PatchedApplication app, bool isLastPatchedApp) {
|
||||
_navigationService.navigateTo(
|
||||
Routes.appInfoView,
|
||||
arguments: AppInfoViewArguments(app: app),
|
||||
arguments: AppInfoViewArguments(app: app, isLastPatchedApp: isLastPatchedApp),
|
||||
);
|
||||
}
|
||||
|
||||
@ -123,10 +124,15 @@ class HomeViewModel extends BaseViewModel {
|
||||
}
|
||||
|
||||
void getPatchedApps() {
|
||||
lastPatchedApp = _managerAPI.getLastPatchedApp();
|
||||
patchedInstalledApps = _managerAPI.getPatchedApps().toList();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool isLastPatchedAppEnabled() {
|
||||
return _managerAPI.isLastPatchedAppEnabled();
|
||||
}
|
||||
|
||||
Future<bool> hasManagerUpdates() async {
|
||||
if (!_managerAPI.releaseBuild) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user