Option to move non-installed apps to bottom (#264)

This commit is contained in:
Imran Remtulla
2023-05-05 23:08:34 -04:00
parent fb9e66332d
commit 30c89fe385
12 changed files with 54 additions and 6 deletions

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "Nicht noch einmal zeigen",
"dontShowTrackOnlyWarnings": "Warnung für 'Nur Nachverfolgen' nicht anzeigen",
"dontShowAPKOriginWarnings": "Warnung für APK-Herkunft nicht anzeigen",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "App entfernen?",
"other": "Apps entfernen?"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "Don't show this again",
"dontShowTrackOnlyWarnings": "Don't Show 'Track-Only' Warnings",
"dontShowAPKOriginWarnings": "Don't Show APK Origin Warnings",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "Remove App?",
"other": "Remove Apps?"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "No mostrar de nuevo",
"dontShowTrackOnlyWarnings": "No mostrar avisos de 'Solo Seguimiento'",
"dontShowAPKOriginWarnings": "No mostrar avisos de las fuentes de las APks",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "¿Eliminar Aplicación?",
"other": "¿Eliminar Aplicaciones?"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "دوباره این را نشان نده",
"dontShowTrackOnlyWarnings": "هشدار 'فقط ردیابی' را نشان ندهید",
"dontShowAPKOriginWarnings": "هشدارهای منبع APK را نشان ندهید",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "برنامه حذف شود؟",
"other": "برنامه ها حذف شوند؟"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "Don't show this again",
"dontShowTrackOnlyWarnings": "Don't Show the 'Track-Only' Warning",
"dontShowAPKOriginWarnings": "Don't Show APK Origin Warnings",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "Supprimer l'application ?",
"other": "Supprimer les applications ?"

View File

@@ -227,6 +227,7 @@
"dontShowAgain": "Ne mutassa ezt újra",
"dontShowTrackOnlyWarnings": "Ne jelenítsen meg 'Csak nyomon követés' figyelmeztetést",
"dontShowAPKOriginWarnings": "Ne jelenítsen meg az APK eredetére vonatkozó figyelmeztetéseket",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazást?"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "Don't show this again",
"dontShowTrackOnlyWarnings": "Don't Show the 'Track-Only' Warning",
"dontShowAPKOriginWarnings": "Don't Show APK Origin Warnings",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "Rimuovere l'App?",
"other": "Rimuovere le App?"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "二度と表示しない",
"dontShowTrackOnlyWarnings": "「追跡のみ」の警告を表示しない",
"dontShowAPKOriginWarnings": "APK Originの警告を表示しない",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "アプリを削除しますか?",
"other": "アプリを削除しますか?"

View File

@@ -228,6 +228,7 @@
"dontShowAgain": "Don't show this again",
"dontShowTrackOnlyWarnings": "Don't Show the 'Track-Only' Warning",
"dontShowAPKOriginWarnings": "Don't Show APK Origin Warnings",
"moveNonInstalledAppsToBottom": "Move Non-Installed Apps to Bottom of Apps View",
"removeAppQuestion": {
"one": "是否删除应用?",
"other": "是否删除应用?"

View File

@@ -185,6 +185,18 @@ class AppsPageState extends State<AppsPage> {
listedApps = [...temp, ...listedApps];
}
if (settingsProvider.buryNonInstalled) {
var temp = [];
listedApps = listedApps.where((sa) {
if (sa.app.installedVersion == null) {
temp.add(sa);
return false;
}
return true;
}).toList();
listedApps = [...listedApps, ...temp];
}
var tempPinned = [];
var tempNotPinned = [];
for (var a in listedApps) {

View File

@@ -227,7 +227,7 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('useBlackTheme')),
Flexible(child: Text(tr('useBlackTheme'))),
Switch(
value: settingsProvider.useBlackTheme,
onChanged: (value) {
@@ -254,7 +254,7 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('showWebInAppView')),
Flexible(child: Text(tr('showWebInAppView'))),
Switch(
value: settingsProvider.showAppWebpage,
onChanged: (value) {
@@ -266,7 +266,7 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('pinUpdates')),
Flexible(child: Text(tr('pinUpdates'))),
Switch(
value: settingsProvider.pinUpdates,
onChanged: (value) {
@@ -278,7 +278,21 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('groupByCategory')),
Flexible(
child: Text(
tr('moveNonInstalledAppsToBottom'))),
Switch(
value: settingsProvider.buryNonInstalled,
onChanged: (value) {
settingsProvider.buryNonInstalled = value;
})
],
),
height16,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(child: Text(tr('groupByCategory'))),
Switch(
value: settingsProvider.groupByCategory,
onChanged: (value) {
@@ -290,7 +304,9 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('dontShowTrackOnlyWarnings')),
Flexible(
child:
Text(tr('dontShowTrackOnlyWarnings'))),
Switch(
value:
settingsProvider.hideTrackOnlyWarning,
@@ -304,7 +320,9 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('dontShowAPKOriginWarnings')),
Flexible(
child:
Text(tr('dontShowAPKOriginWarnings'))),
Switch(
value:
settingsProvider.hideAPKOriginWarning,

View File

@@ -154,6 +154,15 @@ class SettingsProvider with ChangeNotifier {
notifyListeners();
}
bool get buryNonInstalled {
return prefs?.getBool('buryNonInstalled') ?? false;
}
set buryNonInstalled(bool show) {
prefs?.setBool('buryNonInstalled', show);
notifyListeners();
}
bool get groupByCategory {
return prefs?.getBool('groupByCategory') ?? false;
}