mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Merge showUpdateFount: methods into single one
Handling the different variations with different completion blocks is a pain when ultimately clients want to display a mostly unified user interface.
This commit is contained in:
1 parent
2d0b9ae356
commit
e64253be0b
13 files changed
+285
-340
No files matched your search
@@ -14,7 +14,7 @@
|
||||
@property (nonatomic) IBOutlet NSTextView *textView;
|
||||
@property (nonatomic, readonly) SUAppcastItem *appcastItem;
|
||||
@property (nonatomic, nullable) NSAttributedString *preloadedReleaseNotes;
|
||||
@property (nonatomic, copy) void (^reply)(SPUUpdateAlertChoice);
|
||||
@property (nonatomic, copy) void (^reply)(SPUUserUpdateChoice);
|
||||
@property (nonatomic, readonly) BOOL skippable;
|
||||
|
||||
@end
|
||||
@@ -28,7 +28,7 @@
|
||||
@synthesize reply = _reply;
|
||||
@synthesize skippable = _skippable;
|
||||
|
||||
- (instancetype)initWithAppcastItem:(SUAppcastItem *)appcastItem skippable:(BOOL)skippable reply:(void (^)(SPUUpdateAlertChoice))reply
|
||||
- (instancetype)initWithAppcastItem:(SUAppcastItem *)appcastItem skippable:(BOOL)skippable reply:(void (^)(SPUUserUpdateChoice))reply
|
||||
{
|
||||
self = [super initWithNibName:@"SUInstallUpdateViewController" bundle:nil];
|
||||
if (self != nil) {
|
||||
@@ -109,7 +109,7 @@
|
||||
- (IBAction)installUpdate:(id)__unused sender
|
||||
{
|
||||
if (self.reply != nil) {
|
||||
self.reply(SPUInstallUpdateChoice);
|
||||
self.reply(SPUUserUpdateChoiceInstall);
|
||||
self.reply = nil;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@
|
||||
- (IBAction)installUpdateLater:(id)__unused sender
|
||||
{
|
||||
if (self.reply != nil) {
|
||||
self.reply(SPUInstallLaterChoice);
|
||||
self.reply(SPUUserUpdateChoiceDismiss);
|
||||
self.reply = nil;
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@
|
||||
- (IBAction)skipUpdate:(id)__unused sender
|
||||
{
|
||||
if (self.reply != nil) {
|
||||
self.reply(SPUSkipThisVersionChoice);
|
||||
self.reply(SPUUserUpdateChoiceSkip);
|
||||
self.reply = nil;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user