diff --git a/platform-darwin/Source/iOS/MPSitesViewController.h b/platform-darwin/Source/iOS/MPSitesViewController.h index 109a54ea..6bfa83d8 100644 --- a/platform-darwin/Source/iOS/MPSitesViewController.h +++ b/platform-darwin/Source/iOS/MPSitesViewController.h @@ -30,8 +30,6 @@ @property(nonatomic, strong) IBOutlet UIView *badNameTipContainer; @property(nonatomic, strong) IBOutlet UIView *popdownView; @property(nonatomic, strong) IBOutlet UIView *popdownContainer; -@property(nonatomic, strong) IBOutlet UIView *spectreInstallAlert; -@property(nonatomic, strong) IBOutlet UIView *spectreMigrateAlert; @property(assign, nonatomic) BOOL active; @@ -39,6 +37,5 @@ - (void)reloadSites; - (IBAction)dismissPopdown:(id)sender; -- (IBAction)upgradeSpectre:(UIButton *)sender; @end diff --git a/platform-darwin/Source/iOS/MPSitesViewController.m b/platform-darwin/Source/iOS/MPSitesViewController.m index 6defd6ad..f7eade94 100644 --- a/platform-darwin/Source/iOS/MPSitesViewController.m +++ b/platform-darwin/Source/iOS/MPSitesViewController.m @@ -74,7 +74,6 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { [self registerObservers]; [self updateConfigKey:nil]; - [self updateSpectreAlerts]; static NSRegularExpression *bareHostRE = nil; static dispatch_once_t once = 0; @@ -318,7 +317,6 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { PearlAddNotificationObserver( UIApplicationWillEnterForegroundNotification, nil, [NSOperationQueue mainQueue], ^(MPSitesViewController *self, NSNotification *note) { [self viewWillAppear:YES]; - [self updateSpectreAlerts]; } ); PearlAddNotificationObserver( MPSignedOutNotification, nil, nil, ^(MPSitesViewController *self, NSNotification *note) { @@ -466,24 +464,4 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { self.popdownToTopConstraint.priority = UILayoutPriorityDefaultHigh; } -- (IBAction)upgradeSpectre:(UIButton *)sender { - - [[MPiOSAppDelegate get] migrateFor:[MPiOSAppDelegate get].activeUserForMainThread]; -} - -#pragma mark - Private - -- (void)updateSpectreAlerts { - - BOOL spectreInstalled = [UIApp canOpenURL:[[NSURL alloc] initWithString:@"spectre:"]]; - if (spectreInstalled) { - self.spectreInstallAlert.visible = NO; - self.spectreMigrateAlert.visible = YES; - } - else { - self.spectreInstallAlert.visible = [MPiOSAppDelegate get].spectreViewController != nil; - self.spectreMigrateAlert.visible = NO; - } -} - @end diff --git a/platform-darwin/Source/iOS/MPUsersViewController.h b/platform-darwin/Source/iOS/MPUsersViewController.h index 58e31501..acd058c8 100644 --- a/platform-darwin/Source/iOS/MPUsersViewController.h +++ b/platform-darwin/Source/iOS/MPUsersViewController.h @@ -36,11 +36,13 @@ @property(weak, nonatomic) IBOutlet UIButton *previousAvatarButton; @property(weak, nonatomic) IBOutlet NSLayoutConstraint *keyboardHeightConstraint; @property(weak, nonatomic) IBOutlet UIView *spectreInstallAlert; +@property(weak, nonatomic) IBOutlet UIView *spectreMigrateAlert; @property(assign, nonatomic, readonly) BOOL active; - (void)setActive:(BOOL)active animated:(BOOL)animated; - (IBAction)changeAvatar:(UIButton *)sender; - (IBAction)upgradeSpectre:(UIButton *)sender; +- (IBAction)dismissSpectre:(UIButton *)sender; @end diff --git a/platform-darwin/Source/iOS/MPUsersViewController.m b/platform-darwin/Source/iOS/MPUsersViewController.m index f3916937..67768fa3 100644 --- a/platform-darwin/Source/iOS/MPUsersViewController.m +++ b/platform-darwin/Source/iOS/MPUsersViewController.m @@ -733,9 +733,11 @@ referenceSizeForFooterInSection:(NSInteger)section { BOOL spectreInstalled = [UIApp canOpenURL:[[NSURL alloc] initWithString:@"spectre:"]]; if (spectreInstalled) { self.spectreInstallAlert.visible = NO; + self.spectreMigrateAlert.visible = YES; } else { self.spectreInstallAlert.visible = [MPiOSAppDelegate get].spectreViewController != nil; + self.spectreMigrateAlert.visible = NO; } } @@ -922,7 +924,13 @@ referenceSizeForFooterInSection:(NSInteger)section { - (IBAction)upgradeSpectre:(UIButton *)sender { - [[MPiOSAppDelegate get] migrateFor:nil]; + [[MPiOSAppDelegate get] migrateFor:[MPiOSAppDelegate get].activeUserForMainThread]; +} + +- (IBAction)dismissSpectre:(UIButton *)sender { + + self.spectreInstallAlert.visible = NO; + self.spectreMigrateAlert.visible = NO; } @end diff --git a/platform-darwin/Source/iOS/Storyboard.storyboard b/platform-darwin/Source/iOS/Storyboard.storyboard index 6224fda7..36985549 100644 --- a/platform-darwin/Source/iOS/Storyboard.storyboard +++ b/platform-darwin/Source/iOS/Storyboard.storyboard @@ -387,7 +387,7 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + @@ -434,10 +485,12 @@ This app is now out of maintenance. + + @@ -477,6 +530,8 @@ This app is now out of maintenance. + + @@ -484,7 +539,7 @@ This app is now out of maintenance. - + @@ -1707,70 +1762,6 @@ eg. apple.com, rmitchell@twitter.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1814,13 +1805,8 @@ This app is now out of maintenance. - - - - - @@ -1832,7 +1818,6 @@ This app is now out of maintenance. - @@ -1851,8 +1836,6 @@ This app is now out of maintenance. - -