2
0

Move Spectre migration dialogs fully global & make closeable.

This commit is contained in:
Maarten Billemont
2021-11-01 21:16:00 -04:00
parent f27607e63c
commit 5de9b05299
5 changed files with 70 additions and 102 deletions

View File

@@ -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