Fix[UI]: profile states on switch/delete
This commit is contained in:
1 parent
f34fb7f833
commit
094160fbee
4 files changed
+4
-4
No files matched your search
@@ -314,7 +314,7 @@
|
||||
// Update profiles and local version list if needed
|
||||
if (shouldUpdateProfiles) {
|
||||
[contentNavigationController fetchLocalVersionList];
|
||||
[PLProfiles updateCurrent];
|
||||
[contentNavigationController performSelector:@selector(reloadProfileList)];
|
||||
}
|
||||
|
||||
// Update tableView whenever we have
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
[remoteVersionList addObjectsFromArray:responseObject[@"versions"]];
|
||||
NSDebugLog(@"[VersionList] Got %d versions", remoteVersionList.count);
|
||||
setPrefObject(@"internal.latest_version", responseObject[@"latest"]);
|
||||
[self fetchLocalVersionList];
|
||||
self.buttonInstall.enabled = YES;
|
||||
} failure:^(NSURLSessionTask *operation, NSError *error) {
|
||||
NSDebugLog(@"[VersionList] Warning: Unable to fetch version list: %@", error.localizedDescription);
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
[NSFileManager.defaultManager createSymbolicLinkAtPath:lasmPath withDestinationPath:multidirPath error:nil];
|
||||
[NSFileManager.defaultManager changeCurrentDirectoryPath:lasmPath];
|
||||
toggleIsolatedPref(NO);
|
||||
[self.navigationController performSelector:@selector(reloadProfileList) withObject:nil];
|
||||
[self.navigationController performSelector:@selector(reloadProfileList)];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
// Pickup changes made in the profile editor and switching instance
|
||||
[PLProfiles updateCurrent];
|
||||
[self.tableView reloadData];
|
||||
[self.navigationController performSelector:@selector(reloadProfileList) withObject:nil];
|
||||
[self.navigationController performSelector:@selector(reloadProfileList)];
|
||||
}
|
||||
|
||||
- (void)actionTogglePrefIsolation:(UISwitch *)sender {
|
||||
@@ -203,6 +203,7 @@
|
||||
confirmAlert.popoverPresentationController.sourceRect = cell.bounds;
|
||||
UIAlertAction *ok = [UIAlertAction actionWithTitle:localize(@"OK", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
|
||||
[PLProfiles.current.profiles removeObjectForKey:cell.textLabel.text];
|
||||
[PLProfiles.current save];
|
||||
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}];
|
||||
UIAlertAction *cancel = [UIAlertAction actionWithTitle:localize(@"Cancel", nil) style:UIAlertActionStyleCancel handler:nil];
|
||||
|
||||
Reference in new issue
Block a user