mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Reset skipped updates when updates are user initiated and checked (#1887)
Instead of only when a new update is found. This resets skipped updates if the user initiates a new check even if a new update is not found.
This commit is contained in:
1 parent
2157f78ffd
commit
29d4b801fc
1 file changed
+13
-4
Vendored
+13
-4
@@ -139,22 +139,35 @@
|
||||
[self.coreDriver preflightForUpdatePermissionPreventingInstallerInteraction:preventsInstallerInteraction reply:reply];
|
||||
}
|
||||
|
||||
- (void)_clearSkippedUpdatesIfUserInitiated
|
||||
{
|
||||
if (self.userInitiated) {
|
||||
[SPUSkippedUpdate clearSkippedUpdateForHost:self.host];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkForUpdatesAtAppcastURL:(NSURL *)appcastURL withUserAgent:(NSString *)userAgent httpHeaders:(NSDictionary * _Nullable)httpHeaders inBackground:(BOOL)background
|
||||
{
|
||||
self.httpHeaders = httpHeaders;
|
||||
self.userAgent = userAgent;
|
||||
|
||||
[self _clearSkippedUpdatesIfUserInitiated];
|
||||
|
||||
[self.coreDriver checkForUpdatesAtAppcastURL:appcastURL withUserAgent:userAgent httpHeaders:httpHeaders inBackground:background requiresSilentInstall:NO];
|
||||
}
|
||||
|
||||
- (void)resumeInstallingUpdateWithCompletion:(SPUUpdateDriverCompletion)completionBlock
|
||||
{
|
||||
[self _clearSkippedUpdatesIfUserInitiated];
|
||||
|
||||
self.resumingInstallingUpdate = YES;
|
||||
[self.coreDriver resumeInstallingUpdateWithCompletion:completionBlock];
|
||||
}
|
||||
|
||||
- (void)resumeUpdate:(id<SPUResumableUpdate>)resumableUpdate completion:(SPUUpdateDriverCompletion)completionBlock
|
||||
{
|
||||
[self _clearSkippedUpdatesIfUserInitiated];
|
||||
|
||||
// Informational downloads shouldn't be presented as updates to be downloaded
|
||||
// Neither should items that prevent auto updating
|
||||
if (!resumableUpdate.updateItem.isInformationOnlyUpdate && !resumableUpdate.updateItem.majorUpgrade) {
|
||||
@@ -172,10 +185,6 @@
|
||||
|
||||
- (void)basicDriverDidFindUpdateWithAppcastItem:(SUAppcastItem *)updateItem secondaryAppcastItem:(SUAppcastItem * _Nullable)secondaryUpdateItem
|
||||
{
|
||||
if (self.userInitiated) {
|
||||
[SPUSkippedUpdate clearSkippedUpdateForHost:self.host];
|
||||
}
|
||||
|
||||
id <SPUUpdaterDelegate> updaterDelegate = self.updaterDelegate;
|
||||
|
||||
SPUUserUpdateStage stage;
|
||||
|
||||
Reference in new issue
Block a user