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.

Take each update Sparkle leaves Peel to tell

Țugui Dragoșe5c33376d573
diff --git a/Peel/Model/PeelUpdater.swift b/Peel/Model/PeelUpdater.swift
index a73deac7..b65e0cdb 100644
--- a/Peel/Model/PeelUpdater.swift
+++ b/Peel/Model/PeelUpdater.swift
@@ -69,6 +69,14 @@ final class PeelUpdater: NSObject, SPUUpdaterDelegate, SPUStandardUserDriverDele
) -> Bool {
immediateFocus
}
+
+ /// Where Sparkle hands Peel an update it leaves to Peel to tell, which Sparkle requires once Peel takes any.
+ /// `newerVersion`, set when Sparkle found it, already shows it in the face, the sidebar and About.
+ nonisolated func standardUserDriverWillHandleShowingUpdate(
+ _ handleShowingUpdate: Bool,
+ forUpdate update: SUAppcastItem,
+ state: SPUUserUpdateState
+ ) {}
}
/// Why Sparkle skips a check it starts on its own, in its log. It shows nothing and schedules the next check.
diff --git a/PeelTests/PeelUpdaterTests.swift b/PeelTests/PeelUpdaterTests.swift
new file mode 100644
index 00000000..02de59db
--- /dev/null
+++ b/PeelTests/PeelUpdaterTests.swift
@@ -0,0 +1,15 @@
+@testable import Peel
+import Sparkle
+import Testing
+
+struct PeelUpdaterTests {
+ @Test func takesTheUpdatesItRemindsOfGentlyFromSparkle() {
+ let updater = PeelUpdater()
+ let takesThem = #selector(
+ (any SPUStandardUserDriverDelegate).standardUserDriverWillHandleShowingUpdate(_:forUpdate:state:)
+ )
+
+ #expect(updater.supportsGentleScheduledUpdateReminders)
+ #expect(updater.responds(to: takesThem))
+ }
+}