Move Spectre migration dialogs fully global & make closeable.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user