2
0

Spectre migration updates.

[ADDED]     Migration prompt to sign-in screen.
[FIXED]     Spectre Apple ID.
This commit is contained in:
Maarten Billemont
2021-10-31 14:15:25 -04:00
parent 403c45519a
commit 4c096555d0
5 changed files with 120 additions and 65 deletions

View File

@@ -100,6 +100,7 @@ typedef NS_ENUM( NSUInteger, MPActiveUserState ) {
[self registerObservers];
[self reloadUsers];
[self updateSpectreAlerts];
[self.marqueeTipTimer invalidate];
self.marqueeTipTimer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector( firedMarqueeTimer: )
@@ -660,6 +661,7 @@ referenceSizeForFooterInSection:(NSInteger)section {
PearlAddNotificationObserver( UIApplicationWillEnterForegroundNotification, nil, [NSOperationQueue mainQueue],
^(MPUsersViewController *self, NSNotification *note) {
[self reloadUsers];
[self updateSpectreAlerts];
} );
PearlAddNotificationObserver( UIApplicationDidBecomeActiveNotification, nil, [NSOperationQueue mainQueue],
^(MPUsersViewController *self, NSNotification *note) {
@@ -726,6 +728,17 @@ referenceSizeForFooterInSection:(NSInteger)section {
}];
}
- (void)updateSpectreAlerts {
BOOL spectreInstalled = [UIApp canOpenURL:[[NSURL alloc] initWithString:@"spectre:"]];
if (spectreInstalled) {
self.spectreInstallAlert.visible = NO;
}
else {
self.spectreInstallAlert.visible = [MPiOSAppDelegate get].spectreViewController != nil;
}
}
#pragma mark - NSFetchedResultsControllerDelegate
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
@@ -907,4 +920,9 @@ referenceSizeForFooterInSection:(NSInteger)section {
++[self selectedAvatar].avatar;
}
- (IBAction)upgradeSpectre:(UIButton *)sender {
[[MPiOSAppDelegate get] migrateFor:nil];
}
@end