diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 2bc8000..8b78ce2 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -52,6 +52,7 @@
+
diff --git a/assets/translations/de.json b/assets/translations/de.json
index ac7da30..9d72135 100644
--- a/assets/translations/de.json
+++ b/assets/translations/de.json
@@ -178,7 +178,6 @@
"installedVersionX": "Installierte Version: {}",
"lastUpdateCheckX": "Letzte Aktualisierungsprüfung: {}",
"remove": "Entfernen",
- "removeAppQuestion": "App entfernen?",
"yesMarkUpdated": "Ja, als aktualisiert markieren",
"fdroid": "F-Droid",
"appIdOrName": "App ID oder Name",
@@ -212,6 +211,12 @@
"storagePermissionDenied": "Storage permission denied",
"selectedCategorizeWarning": "This will replace any existing category settings for the selected Apps.",
"filterAPKsByRegEx": "Filter APKs by Regular Expression",
+ "removeFromObtainium": "Remove from Obtainium",
+ "uninstallFromDevice": "Uninstall from Device",
+ "removeAppQuestion": {
+ "one": "App entfernen?",
+ "other": "App entfernen?"
+ },
"tooManyRequestsTryAgainInMinutes": {
"one": "Zu viele Anfragen (Rate begrenzt) - versuchen Sie es in {} Minute erneut",
"other": "Zu viele Anfragen (Rate begrenzt) - versuchen Sie es in {} Minuten erneut"
diff --git a/assets/translations/en.json b/assets/translations/en.json
index 274947e..6fcc87a 100644
--- a/assets/translations/en.json
+++ b/assets/translations/en.json
@@ -178,7 +178,6 @@
"installedVersionX": "Installed Version: {}",
"lastUpdateCheckX": "Last Update Check: {}",
"remove": "Remove",
- "removeAppQuestion": "Remove App?",
"yesMarkUpdated": "Yes, Mark as Updated",
"fdroid": "F-Droid",
"appIdOrName": "App ID or Name",
@@ -212,6 +211,12 @@
"storagePermissionDenied": "Storage permission denied",
"selectedCategorizeWarning": "This will replace any existing category settings for the selected Apps.",
"filterAPKsByRegEx": "Filter APKs by Regular Expression",
+ "removeFromObtainium": "Remove from Obtainium",
+ "uninstallFromDevice": "Uninstall from Device",
+ "removeAppQuestion": {
+ "one": "Remove App?",
+ "other": "Remove Apps?"
+ },
"tooManyRequestsTryAgainInMinutes": {
"one": "Too many requests (rate limited) - try again in {} minute",
"other": "Too many requests (rate limited) - try again in {} minutes"
diff --git a/assets/translations/hu.json b/assets/translations/hu.json
index c6466fd..0ba0763 100644
--- a/assets/translations/hu.json
+++ b/assets/translations/hu.json
@@ -178,7 +178,6 @@
"installedVersionX": "Telepített verzió: {}",
"lastUpdateCheckX": "Frissítés ellenőrizve: {}",
"remove": "Eltávolítás",
- "removeAppQuestion": "Eltávolítja az alkalmazást?",
"yesMarkUpdated": "Igen, megjelölés frissítettként",
"fdroid": "F-Droid",
"appIdOrName": "App ID vagy név",
@@ -211,6 +210,12 @@
"storagePermissionDenied": "Tárhely engedély megtagadva",
"selectedCategorizeWarning": "Ez felváltja a kiválasztott alkalmazások meglévő kategória-beállításait.",
"filterAPKsByRegEx": "Filter APKs by Regular Expression",
+ "removeFromObtainium": "Remove from Obtainium",
+ "uninstallFromDevice": "Uninstall from Device",
+ "removeAppQuestion": {
+ "one": "Eltávolítja az alkalmazást?",
+ "other": "Eltávolítja az alkalmazást?"
+ },
"tooManyRequestsTryAgainInMinutes": {
"one": "Túl sok kérés (korlátozott arány) – próbálja újra {} perc múlva",
"other": "Túl sok kérés (korlátozott arány) – próbálja újra {} perc múlva"
diff --git a/assets/translations/it.json b/assets/translations/it.json
index 4a56c8a..a6eaaab 100644
--- a/assets/translations/it.json
+++ b/assets/translations/it.json
@@ -178,7 +178,6 @@
"installedVersionX": "Versione installata: {}",
"lastUpdateCheckX": "Ultimo controllo degli aggiornamenti: {}",
"remove": "Rimuovi",
- "removeAppQuestion": "Rimuovere l'App?",
"yesMarkUpdated": "Sì, contrassegna come aggiornato",
"fdroid": "F-Droid",
"appIdOrName": "ID o nome dell'App",
@@ -212,6 +211,12 @@
"storagePermissionDenied": "Storage permission denied",
"selectedCategorizeWarning": "This will replace any existing category settings for the selected Apps.",
"filterAPKsByRegEx": "Filter APKs by Regular Expression",
+ "removeFromObtainium": "Remove from Obtainium",
+ "uninstallFromDevice": "Uninstall from Device",
+ "removeAppQuestion": {
+ "one": "Rimuovere l'App?",
+ "other": "Rimuovere l'App?"
+ },
"tooManyRequestsTryAgainInMinutes": {
"one": "Troppe richieste (traffico limitato) - riprova tra {} minuto",
"other": "Troppe richieste (traffico limitato) - riprova tra {} minuti"
diff --git a/assets/translations/ja.json b/assets/translations/ja.json
index eb078b8..20ef37d 100644
--- a/assets/translations/ja.json
+++ b/assets/translations/ja.json
@@ -178,7 +178,6 @@
"installedVersionX": "インストールされたバージョン: {}",
"lastUpdateCheckX": "最終アップデート確認: {}",
"remove": "削除",
- "removeAppQuestion": "アプリを削除しますか?",
"yesMarkUpdated": "はい、アップデート済みとしてマークします",
"fdroid": "F-Droid",
"appIdOrName": "アプリのIDまたは名前",
@@ -212,6 +211,12 @@
"storagePermissionDenied": "ストレージ権限が拒否されました",
"selectedCategorizeWarning": "これにより、選択したアプリの既存のカテゴリ設定がすべて置き換えられます。",
"filterAPKsByRegEx": "正規表現でAPKを絞り込む",
+ "removeFromObtainium": "Remove from Obtainium",
+ "uninstallFromDevice": "Uninstall from Device",
+ "removeAppQuestion": {
+ "one": "アプリを削除しますか?",
+ "other": "アプリを削除しますか?"
+ },
"tooManyRequestsTryAgainInMinutes": {
"one": "リクエストが多すぎます(レート制限)- {}分後に再試行してください",
"other": "リクエストが多すぎます(レート制限)- {}分後に再試行してください"
diff --git a/assets/translations/zh.json b/assets/translations/zh.json
index 8f103a8..89b6ea6 100644
--- a/assets/translations/zh.json
+++ b/assets/translations/zh.json
@@ -178,7 +178,6 @@
"installedVersionX": "已安装: {}",
"lastUpdateCheckX": "最后检查: {}",
"remove": "删除",
- "removeAppQuestion": "删除应用?",
"yesMarkUpdated": "'是的,标为已更新",
"fdroid": "F-Droid",
"appIdOrName": "应用 ID 或名称",
@@ -212,6 +211,12 @@
"storagePermissionDenied": "存储权限已被拒绝",
"selectedCategorizeWarning": "这将取代所选应用程序的任何现有类别",
"filterAPKsByRegEx": "Filter APKs by Regular Expression",
+ "removeFromObtainium": "Remove from Obtainium",
+ "uninstallFromDevice": "Uninstall from Device",
+ "removeAppQuestion": {
+ "one": "删除应用?",
+ "other": "删除应用?"
+ },
"tooManyRequestsTryAgainInMinutes": {
"one": "请求过多 (API 限制) - 在 {} 分钟后重试",
"other": "请求过多 (API 限制) - 在 {} 分钟后重试"
diff --git a/lib/pages/app.dart b/lib/pages/app.dart
index 94711ca..02bf1bb 100644
--- a/lib/pages/app.dart
+++ b/lib/pages/app.dart
@@ -1,6 +1,7 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import 'package:obtainium/components/generated_form.dart';
import 'package:obtainium/components/generated_form_modal.dart';
import 'package:obtainium/custom_errors.dart';
import 'package:obtainium/main.dart';
@@ -361,40 +362,12 @@ class _AppPageState extends State {
onPressed: app?.downloadProgress != null
? null
: () {
- showDialog(
- context: context,
- builder: (BuildContext ctx) {
- return AlertDialog(
- title: Text(tr('removeAppQuestion')),
- content: Text(tr(
- 'xWillBeRemovedButRemainInstalled',
- args: [
- app?.installedInfo?.name ??
- app?.app.name ??
- tr('app')
- ])),
- actions: [
- TextButton(
- onPressed: () {
- HapticFeedback
- .selectionClick();
- appsProvider.removeApps(
- [app!.app.id]).then((_) {
- int count = 0;
- Navigator.of(context)
- .popUntil((_) =>
- count++ >= 2);
- });
- },
- child: Text(tr('remove'))),
- TextButton(
- onPressed: () {
- Navigator.of(context).pop();
- },
- child: Text(tr('cancel')))
- ],
- );
- });
+ appsProvider.removeAppsWithModal(
+ context, [app!.app]).then((value) {
+ if (value == true) {
+ Navigator.of(context).pop();
+ }
+ });
},
style: TextButton.styleFrom(
foregroundColor:
@@ -414,3 +387,18 @@ class _AppPageState extends State {
);
}
}
+
+class RemoveAppsModal extends StatefulWidget {
+ const RemoveAppsModal({super.key, this.apps = const []});
+ final List apps;
+
+ @override
+ State createState() => _RemoveAppsModalState();
+}
+
+class _RemoveAppsModalState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return const Placeholder();
+ }
+}
diff --git a/lib/pages/apps.dart b/lib/pages/apps.dart
index 56f569a..e81be28 100644
--- a/lib/pages/apps.dart
+++ b/lib/pages/apps.dart
@@ -389,28 +389,30 @@ class AppsPageState extends State {
onPressed: selectedApps.isEmpty
? null
: () {
- showDialog