mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
feat: get changelog from app's specific github path (ugly)
This commit is contained in:
@ -17,7 +17,6 @@ class HomeView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return ViewModelBuilder<HomeViewModel>.reactive(
|
||||
disposeViewModel: false,
|
||||
fireOnModelReadyOnce: true,
|
||||
onModelReady: (model) => model.initialize(),
|
||||
viewModelBuilder: () => locator<HomeViewModel>(),
|
||||
builder: (context, model, child) => Scaffold(
|
||||
@ -111,8 +110,8 @@ class HomeView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
model.showUpdatableApps
|
||||
? const AvailableUpdatesCard()
|
||||
: const InstalledAppsCard()
|
||||
? AvailableUpdatesCard()
|
||||
: InstalledAppsCard(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -26,14 +26,14 @@ class HomeViewModel extends BaseViewModel {
|
||||
List<PatchedApplication> patchedUpdatableApps = [];
|
||||
|
||||
Future<void> initialize() async {
|
||||
await _getPatchedApps();
|
||||
await flutterLocalNotificationsPlugin.initialize(
|
||||
const InitializationSettings(
|
||||
android: AndroidInitializationSettings('ic_notification'),
|
||||
),
|
||||
onSelectNotification: (p) => DeviceApps.openApp('app.revanced.manager'),
|
||||
);
|
||||
_managerAPI.reAssessSavedApps().then((_) => notifyListeners());
|
||||
_getPatchedApps();
|
||||
_managerAPI.reAssessSavedApps().then((_) => _getPatchedApps());
|
||||
}
|
||||
|
||||
void toggleUpdatableApps(bool value) {
|
||||
@ -49,11 +49,8 @@ class HomeViewModel extends BaseViewModel {
|
||||
locator<MainViewModel>().setIndex(1);
|
||||
}
|
||||
|
||||
Future<void> _getPatchedApps() async {
|
||||
patchedInstalledApps = _managerAPI
|
||||
.getPatchedApps()
|
||||
.where((app) => app.hasUpdates == false)
|
||||
.toList();
|
||||
void _getPatchedApps() {
|
||||
patchedInstalledApps = _managerAPI.getPatchedApps().toList();
|
||||
patchedUpdatableApps = _managerAPI
|
||||
.getPatchedApps()
|
||||
.where((app) => app.hasUpdates == true)
|
||||
|
@ -136,7 +136,7 @@ class InstallerViewModel extends BaseViewModel {
|
||||
update(1.0, 'Installed!', 'Installed!');
|
||||
_app!.patchDate = DateTime.now();
|
||||
_app!.appliedPatches = _patches.map((p) => p.name).toList();
|
||||
_managerAPI.savePatchedApp(_app!);
|
||||
await _managerAPI.savePatchedApp(_app!);
|
||||
} else {
|
||||
update(1.0, 'Aborting...', 'An error occurred! Aborting');
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class RootCheckerViewModel extends BaseViewModel {
|
||||
|
||||
Future<void> navigateToHome() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
prefs.setBool('isRooted', isRooted);
|
||||
await prefs.setBool('isRooted', isRooted);
|
||||
_navigationService.navigateTo(Routes.navigation);
|
||||
notifyListeners();
|
||||
}
|
||||
|
Reference in New Issue
Block a user