Commit 85e7a37b authored by Pierre SAGASPE's avatar Pierre SAGASPE Committed by Felix Paul Kühne

oneDrive: fix display after login

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 7513bcf9
......@@ -126,7 +126,7 @@
}
case 3: {
//OneDrive
BOOL isAuthorized = [[VLCOneDriveController sharedInstance] activeSession];
BOOL isAuthorized = [[VLCOneDriveController sharedInstance] isAuthorized];
cell.icon.image = [UIImage imageNamed:@"OneDrive"];
cell.cloudTitle.text = @"OneDrive";
cell.cloudInformation.text = isAuthorized ? NSLocalizedString(@"LOGGED_IN", "") : NSLocalizedString(@"LOGIN", "");
......
......@@ -47,6 +47,7 @@
{
[super viewWillAppear:animated];
[self updateViewAfterSessionChange];
self.authorizationInProgress = NO;
}
#pragma mark - generic interface interaction
......@@ -117,7 +118,11 @@
- (void)loginAction:(id)sender
{
[_oneDriveController login];
if (![_oneDriveController isAuthorized]) {
self.authorizationInProgress = YES;
[_oneDriveController login];
} else
[_oneDriveController logout];
}
#pragma mark - onedrive controller delegation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment