Pass majorUpdate information to user driver

We unify the user driver method showing the update to take a generic state object now. The current fields of the state object are its current stage, if it's user initiated, and if the update is a major one.

We also remove deprecated code paths that were complex to support and will otherwise generate in compile errors if people adopt the new API.
This commit is contained in:
Zorg committed 2021-05-09 22:42:42 -07:00
1 parent a79f6b2a85
commit d193f2e28b
16 files changed
+246 -326

No files matched your search

@@ -15,7 +15,6 @@
@property (nonatomic, readonly) SUAppcastItem *appcastItem;
@property (nonatomic, nullable) NSAttributedString *preloadedReleaseNotes;
@property (nonatomic, copy) void (^reply)(SPUUserUpdateChoice);
@property (nonatomic, readonly) BOOL skippable;
@end
@@ -26,14 +25,12 @@
@synthesize preloadedReleaseNotes = _preloadedReleaseNotes;
@synthesize appcastItem = _appcastItem;
@synthesize reply = _reply;
@synthesize skippable = _skippable;
- (instancetype)initWithAppcastItem:(SUAppcastItem *)appcastItem skippable:(BOOL)skippable reply:(void (^)(SPUUserUpdateChoice))reply
- (instancetype)initWithAppcastItem:(SUAppcastItem *)appcastItem reply:(void (^)(SPUUserUpdateChoice))reply
{
self = [super initWithNibName:@"SUInstallUpdateViewController" bundle:nil];
if (self != nil) {
_appcastItem = appcastItem;
_skippable = skippable;
self.reply = reply;
}
return self;
@@ -43,8 +40,6 @@
{
[super viewDidLoad];
self.skipUpdatesButton.enabled = self.skippable;
[[self.textView enclosingScrollView] setDrawsBackground:NO];
[self.textView setDrawsBackground:NO];