Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Offer the options before a move only for an app that can move

Țugui Dragoșf54425b9af84
diff --git a/Peel/Views/AppDetailView.swift b/Peel/Views/AppDetailView.swift
index 73944dc2..a7efa912 100644
--- a/Peel/Views/AppDetailView.swift
+++ b/Peel/Views/AppDetailView.swift
@@ -179,10 +179,10 @@ struct AppDetailView: View {
recommendedSection
reviewSection
- if PrivacyReset.isAllowed(for: plan.app), !plan.isAppInTheTrash {
+ if !PrivacyReset.apps(among: [plan.app], moving: plan.selectable).isEmpty {
PrivacyResetRow(isOn: $resetsPrivacy, detail: PrivacyResetRow.beforeTheMove)
}
- if plan.hasDockTile, plan.removedElsewhere == nil {
+ if plan.hasDockTile, plan.selectable.contains(plan.app.url) {
DockTileRow(isOn: $removesDockTile)
}
defaultsSection
diff --git a/Peel/Views/MultipleAppsView.swift b/Peel/Views/MultipleAppsView.swift
index 990dd302..6ffebb00 100644
--- a/Peel/Views/MultipleAppsView.swift
+++ b/Peel/Views/MultipleAppsView.swift
@@ -93,12 +93,10 @@ struct MultipleAppsView: View {
}
}
- if plan.apps.contains(where: {
- PrivacyReset.isAllowed(for: $0) && !plan.appsInTheTrash.contains($0.url)
- }) {
+ if !PrivacyReset.apps(among: plan.apps, moving: plan.selectable).isEmpty {
PrivacyResetRow(isOn: $resetsPrivacy, detail: PrivacyResetRow.beforeTheMove)
}
- if !plan.appsInTheDock.isEmpty {
+ if !plan.appsInTheDock.isDisjoint(with: plan.selectable) {
DockTileRow(isOn: $removesDockTiles)
}
}