mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 23:47:01 +00:00
hide done button when doing UDID style auth
This commit is contained in:
parent
378c4e91f5
commit
036d86bc15
@ -69,11 +69,7 @@
|
|||||||
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
|
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
|
||||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
|
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
|
||||||
|
|
||||||
[self updateSkipButton];
|
[self updateBarButtons];
|
||||||
|
|
||||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
|
|
||||||
target:self
|
|
||||||
action:@selector(saveAction:)];
|
|
||||||
|
|
||||||
self.navigationItem.rightBarButtonItem.enabled = [self allRequiredFieldsEntered];
|
self.navigationItem.rightBarButtonItem.enabled = [self allRequiredFieldsEntered];
|
||||||
}
|
}
|
||||||
@ -88,11 +84,11 @@
|
|||||||
- (void)setShowsSkipButton:(BOOL)showsSkipButton {
|
- (void)setShowsSkipButton:(BOOL)showsSkipButton {
|
||||||
if(_showsSkipButton != showsSkipButton) {
|
if(_showsSkipButton != showsSkipButton) {
|
||||||
_showsSkipButton = showsSkipButton;
|
_showsSkipButton = showsSkipButton;
|
||||||
[self updateSkipButton];
|
[self updateBarButtons];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) updateSkipButton {
|
- (void) updateBarButtons {
|
||||||
if(self.showsSkipButton) {
|
if(self.showsSkipButton) {
|
||||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:BITHockeyLocalizedString(@"Skip")
|
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:BITHockeyLocalizedString(@"Skip")
|
||||||
style:UIBarButtonItemStyleBordered
|
style:UIBarButtonItemStyleBordered
|
||||||
@ -101,6 +97,13 @@
|
|||||||
} else {
|
} else {
|
||||||
self.navigationItem.leftBarButtonItem = nil;
|
self.navigationItem.leftBarButtonItem = nil;
|
||||||
}
|
}
|
||||||
|
if(self.showsLoginViaWebButton) {
|
||||||
|
self.navigationItem.rightBarButtonItem = nil;
|
||||||
|
} else {
|
||||||
|
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
|
||||||
|
target:self
|
||||||
|
action:@selector(saveAction:)];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setShowsLoginViaWebButton:(BOOL)showsLoginViaWebButton {
|
- (void)setShowsLoginViaWebButton:(BOOL)showsLoginViaWebButton {
|
||||||
@ -108,6 +111,7 @@
|
|||||||
_showsLoginViaWebButton = showsLoginViaWebButton;
|
_showsLoginViaWebButton = showsLoginViaWebButton;
|
||||||
if(self.isViewLoaded) {
|
if(self.isViewLoaded) {
|
||||||
[self.tableView reloadData];
|
[self.tableView reloadData];
|
||||||
|
[self updateBarButtons];
|
||||||
[self updateWebLoginButton];
|
[self updateWebLoginButton];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user