mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Simplify logic in -preferredUpdateForRegularAppcastItem method
This commit is contained in:
1 parent
564f0c316a
commit
063974c553
1 file changed
+4
-8
Vendored
+4
-8
@@ -69,14 +69,7 @@
|
||||
|
||||
- (SUAppcastItem * _Nullable)preferredUpdateForRegularAppcastItem:(SUAppcastItem * _Nullable)regularItem secondaryUpdate:(SUAppcastItem * __autoreleasing _Nullable *)secondaryUpdate
|
||||
{
|
||||
if (regularItem == nil) {
|
||||
if (secondaryUpdate != NULL) {
|
||||
*secondaryUpdate = nil;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
SUAppcastItem *deltaItem = [[self class] deltaUpdateFromAppcastItem:regularItem hostVersion:self.host.version];
|
||||
SUAppcastItem *deltaItem = (regularItem != nil) ? [[self class] deltaUpdateFromAppcastItem:regularItem hostVersion:self.host.version] : nil;
|
||||
|
||||
if (deltaItem != nil) {
|
||||
if (secondaryUpdate != NULL) {
|
||||
@@ -84,6 +77,9 @@
|
||||
}
|
||||
return deltaItem;
|
||||
} else {
|
||||
if (secondaryUpdate != NULL) {
|
||||
*secondaryUpdate = nil;
|
||||
}
|
||||
return regularItem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user