mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
fix button's disabled after failed login
* rename method * invert logic
This commit is contained in:
parent
567b0def60
commit
0e1b435eb7
@ -217,7 +217,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)saveAction:(id)sender {
|
- (void)saveAction:(id)sender {
|
||||||
[self showLoginUI:YES];
|
[self setLoginUIEnabled:NO];
|
||||||
|
|
||||||
__weak typeof(self) weakSelf = self;
|
__weak typeof(self) weakSelf = self;
|
||||||
[self.delegate authenticationViewController:self
|
[self.delegate authenticationViewController:self
|
||||||
@ -234,14 +234,14 @@
|
|||||||
otherButtonTitles:nil];
|
otherButtonTitles:nil];
|
||||||
[alertView show];
|
[alertView show];
|
||||||
typeof(self) strongSelf = weakSelf;
|
typeof(self) strongSelf = weakSelf;
|
||||||
[strongSelf showLoginUI:NO];
|
[strongSelf setLoginUIEnabled:YES];
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) showLoginUI:(BOOL) enableLoginUI {
|
- (void) setLoginUIEnabled:(BOOL) enabled {
|
||||||
self.navigationItem.rightBarButtonItem.enabled = !enableLoginUI;
|
self.navigationItem.rightBarButtonItem.enabled = !enabled;
|
||||||
self.tableView.userInteractionEnabled = !enableLoginUI;
|
self.tableView.userInteractionEnabled = !enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user