mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
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:
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];
|
||||
|
||||
|
||||
Reference in new issue
Block a user