Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Show the Watch the Trash warning only when watching failed
Țugui Dragoșc33f2bfb8192
diff --git a/Peel/Model/TrashMonitor.swift b/Peel/Model/TrashMonitor.swiftindex 206cc72d..2ea84798 100644--- a/Peel/Model/TrashMonitor.swift+++ b/Peel/Model/TrashMonitor.swift@@ -8,9 +8,12 @@ import PeelCore@Observablefinal class TrashMonitor {enum Status {+ /// Not asked to watch, or stopped.case offcase watchingcase needsFullDiskAccess+ /// Asked to watch, and the Trash could not be watched.+ case unavailable}/// The home Trash's watch, the one macOS keeps behind Full Disk Access.@@ -47,13 +50,13 @@ final class TrashMonitor {returncase .unavailable:OwnTrashMoves.shared.whenSettled(nil)- status = .off+ status = .unavailablereturn}watch.onRestart = { [weak self] result inguard result != .watching else { return }self?.stop()- self?.status = result == .refused ? .needsFullDiskAccess : .off+ self?.status = result == .refused ? .needsFullDiskAccess : .unavailable}startVolumes()}diff --git a/Peel/Views/Settings/SettingsView.swift b/Peel/Views/Settings/SettingsView.swiftindex f7938ed2..d1a6ed01 100644--- a/Peel/Views/Settings/SettingsView.swift+++ b/Peel/Views/Settings/SettingsView.swift@@ -288,7 +288,7 @@ private struct GeneralSettingsView: View {home.openFullDiskAccessSettings()}}- } else if watchesTrash, trashMonitor.status == .off {+ } else if watchesTrash, trashMonitor.status == .unavailable {WarningLabel(title: Text("Peel isn’t watching the Trash right now. It tries again each time you come back to Peel."))}toggle("Warn when the disk is almost full", isOn: $warnsWhenDiskIsNearlyFull,