mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-13 02:14:31 +01:00
feat: toast for disabled updates.
This commit is contained in:
parent
63b2d8e0bd
commit
84a788fd9e
3 changed files with 14 additions and 12 deletions
|
@ -26,7 +26,8 @@
|
||||||
"installingMessage": "Installing update...",
|
"installingMessage": "Installing update...",
|
||||||
"errorDownloadMessage": "Unable to download update",
|
"errorDownloadMessage": "Unable to download update",
|
||||||
"errorInstallMessage": "Unable to install update",
|
"errorInstallMessage": "Unable to install update",
|
||||||
"noConnection": "No internet connection"
|
"noConnection": "No internet connection",
|
||||||
|
"updatesDisabled": "Updating a patched app is currently disabled. Repatch the app again."
|
||||||
},
|
},
|
||||||
"applicationItem": {
|
"applicationItem": {
|
||||||
"patchButton": "Patch",
|
"patchButton": "Patch",
|
||||||
|
|
|
@ -143,6 +143,10 @@ class HomeViewModel extends BaseViewModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updatesAreDisabled() {
|
||||||
|
_toast.show('homeView.updatesDisabled');
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> showUpdateConfirmationDialog(BuildContext parentContext) async {
|
Future<void> showUpdateConfirmationDialog(BuildContext parentContext) async {
|
||||||
return showDialog(
|
return showDialog(
|
||||||
context: parentContext,
|
context: parentContext,
|
||||||
|
|
|
@ -45,17 +45,14 @@ class AvailableUpdatesCard extends StatelessWidget {
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: apps
|
children: apps
|
||||||
.map((app) => ApplicationItem(
|
.map((app) => ApplicationItem(
|
||||||
icon: app.icon,
|
icon: app.icon,
|
||||||
name: app.name,
|
name: app.name,
|
||||||
patchDate: app.patchDate,
|
patchDate: app.patchDate,
|
||||||
changelog: app.changelog,
|
changelog: app.changelog,
|
||||||
isUpdatableApp: true,
|
isUpdatableApp: true,
|
||||||
//TODO: Find a better way to do update functionality
|
//TODO: Find a better way to do update functionality
|
||||||
onPressed: () {}
|
onPressed: () =>
|
||||||
// () =>
|
locator<HomeViewModel>().updatesAreDisabled(),
|
||||||
// locator<HomeViewModel>().navigateToPatcher(
|
|
||||||
// app,
|
|
||||||
// ),
|
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue