mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-18 12:48:10 +02:00
Added "not installed" button
This commit is contained in:
@@ -129,8 +129,41 @@ class _AppPageState extends State<AppPage> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
tooltip: 'Mark as Installed',
|
tooltip: 'Mark as Installed',
|
||||||
icon: const Icon(Icons.done)),
|
icon: const Icon(Icons.done))
|
||||||
if (app?.app.installedVersion == null)
|
else
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext ctx) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: const Text('App Not Installed?'),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
child: const Text('No')),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
HapticFeedback.selectionClick();
|
||||||
|
var updatedApp = app?.app;
|
||||||
|
if (updatedApp != null) {
|
||||||
|
updatedApp.installedVersion =
|
||||||
|
null;
|
||||||
|
appsProvider
|
||||||
|
.saveApp(updatedApp);
|
||||||
|
}
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'Yes, Mark as Not Installed'))
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
tooltip: 'Mark as Not Installed',
|
||||||
|
icon: const Icon(Icons.no_cell_outlined)),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
|
Reference in New Issue
Block a user