#1675 (fix iPad login/signup layout)

- Fixed dark fields.
- Fixed login controls not being centered.
- Fixed login view appearing then disapparing on iPad.
- Fixed crashes trying to load data while showing login view.
This commit is contained in:
David Sinclair 2022-05-03 21:47:17 -06:00
parent 8f83b73d7a
commit 14a3d925e4
2 changed files with 15 additions and 5 deletions

View file

@ -46,6 +46,8 @@
- (void)viewDidLoad {
self.appDelegate = NewsBlurAppDelegate.sharedAppDelegate;
self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
self.usernameInput.borderStyle = UITextBorderStyleRoundedRect;
self.passwordInput.borderStyle = UITextBorderStyleRoundedRect;
self.emailInput.borderStyle = UITextBorderStyleRoundedRect;
@ -63,11 +65,6 @@
//[self.onePasswordButton setHidden:![[OnePasswordExtension sharedExtension] isAppExtensionAvailable]];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
[self updateControls];
[self rearrangeViews];
}
[super viewDidLoad];
}
@ -110,6 +107,11 @@
- (void)viewDidAppear:(BOOL)animated {
[MBProgressHUD hideHUDForView:self.view animated:YES];
[super viewDidAppear:animated];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
[self updateControls];
[self rearrangeViews];
}
}
- (void)didReceiveMemoryWarning {

View file

@ -1186,6 +1186,10 @@
}
- (void)showLogin {
if (self.loginViewController.view.window != nil) {
return;
}
self.dictFeeds = nil;
self.dictSocialFeeds = nil;
self.dictSavedStoryTags = nil;
@ -1931,6 +1935,10 @@
self.readStories = [NSMutableArray array];
NSMutableArray *feeds = [NSMutableArray array];
if (self.loginViewController.view.window != nil) {
return;
}
self.inFeedDetail = YES;
[feedDetailView resetFeedDetail];
if (feedDetailView == feedDetailViewController) {