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 Reopen Peel in Settings once Full Disk Access may be given

Țugui Dragoș773435b5fc5e
diff --git a/Peel/Views/Settings/SettingsView.swift b/Peel/Views/Settings/SettingsView.swift
index 8526f4b0..7db3e22f 100644
--- a/Peel/Views/Settings/SettingsView.swift
+++ b/Peel/Views/Settings/SettingsView.swift
@@ -275,8 +275,11 @@ private struct GeneralSettingsView: View {
HStack {
StatusLabel(title: Text("Peel needs Full Disk Access to watch the Trash."), systemImage: "lock.trianglebadge.exclamationmark")
Spacer()
- // Goes through `HomeModel`, so Home offers "Reopen Peel" afterward: Full Disk Access
- // applies only to a process started after it is granted.
+ // Full Disk Access applies only to a new process, so once it may have been given, Peel offers
+ // to reopen.
+ if home.needsRelaunchForFullDiskAccess {
+ Button("Reopen Peel") { home.relaunch() }
+ }
Button("Open System Settings") {
home.openFullDiskAccessSettings()
}