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.

Check for updates at once wherever the switch is turned on

Țugui Dragoșa56046749171
diff --git a/Peel/PeelApp.swift b/Peel/PeelApp.swift
index 6765e2b2..1f9d1950 100644
--- a/Peel/PeelApp.swift
+++ b/Peel/PeelApp.swift
@@ -451,6 +451,10 @@ struct PeelApp: App {
QuitGuard.quit()
}
}
+ .onChange(of: checksForAppUpdates) { _, isChecking in
+ guard isChecking else { return }
+ Task { await library.checkForUpdates(library.apps) }
+ }
.onChange(of: warnsWhenDiskIsNearlyFull) { _, warns in
// Turned on again, the warning is new: a disk that is already nearly full is told about at once.
UserDefaults.standard.removeObject(forKey: SettingsKey.toldDiskIsNearlyFull)
diff --git a/Peel/Views/Settings/SettingsView.swift b/Peel/Views/Settings/SettingsView.swift
index a39a7f31..b0cbddcd 100644
--- a/Peel/Views/Settings/SettingsView.swift
+++ b/Peel/Views/Settings/SettingsView.swift
@@ -469,10 +469,6 @@ private struct GeneralSettingsView: View {
}
}
.formStyle(.grouped)
- .onChange(of: checksForAppUpdates) { _, isChecking in
- guard isChecking else { return }
- Task { await library.checkForUpdates(library.apps) }
- }
.task {
readStandings()
await home.loginItem.refresh()