mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-19 05:00:21 +02:00
Added uninstall option
This commit is contained in:
@@ -389,28 +389,30 @@ class AppsPageState extends State<AppsPage> {
|
||||
onPressed: selectedApps.isEmpty
|
||||
? null
|
||||
: () {
|
||||
showDialog<Map<String, dynamic>?>(
|
||||
context: context,
|
||||
builder: (BuildContext ctx) {
|
||||
return GeneratedFormModal(
|
||||
title: tr(
|
||||
'removeSelectedAppsQuestion'),
|
||||
items: const [],
|
||||
initValid: true,
|
||||
message: tr(
|
||||
'xWillBeRemovedButRemainInstalled',
|
||||
args: [
|
||||
plural('apps',
|
||||
selectedApps.length)
|
||||
]),
|
||||
);
|
||||
}).then((values) {
|
||||
if (values != null) {
|
||||
appsProvider.removeApps(selectedApps
|
||||
.map((e) => e.id)
|
||||
.toList());
|
||||
}
|
||||
});
|
||||
appsProvider.removeAppsWithModal(
|
||||
context, selectedApps.toList());
|
||||
// showDialog<Map<String, dynamic>?>(
|
||||
// context: context,
|
||||
// builder: (BuildContext ctx) {
|
||||
// return GeneratedFormModal(
|
||||
// title: tr(
|
||||
// 'removeSelectedAppsQuestion'),
|
||||
// items: const [],
|
||||
// initValid: true,
|
||||
// message: tr(
|
||||
// 'xWillBeRemovedButRemainInstalled',
|
||||
// args: [
|
||||
// plural('apps',
|
||||
// selectedApps.length)
|
||||
// ]),
|
||||
// );
|
||||
// }).then((values) {
|
||||
// if (values != null) {
|
||||
// appsProvider.removeApps(selectedApps
|
||||
// .map((e) => e.id)
|
||||
// .toList());
|
||||
// }
|
||||
// });
|
||||
},
|
||||
tooltip: tr('removeSelectedApps'),
|
||||
icon: const Icon(Icons.delete_outline_outlined),
|
||||
|
Reference in New Issue
Block a user