Просмотр исходного кода

clouds: fix navigation back after logout

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 10 лет назад
Родитель
Сommit
f06af90b28

+ 1 - 1
Sources/VLCCloudStorageTableViewController.m

@@ -154,7 +154,7 @@
 
 - (void)goBack
 {
-    if ((![self.currentPath isEqualToString:@""] && ![self.currentPath isEqualToString:@"/"]) && [self.currentPath length] > 0) {
+    if (((![self.currentPath isEqualToString:@""] && ![self.currentPath isEqualToString:@"/"]) && [self.currentPath length] > 0) && [self.controller isAuthorized]){
         self.currentPath = [self.currentPath stringByDeletingLastPathComponent];
         [self _requestInformationForCurrentPath];
     } else

+ 1 - 1
Sources/VLCOneDriveTableViewController.m

@@ -54,7 +54,7 @@
 
 - (void)goBack
 {
-    if (_oneDriveController.rootFolder != _oneDriveController.currentFolder) {
+    if ((_oneDriveController.rootFolder != _oneDriveController.currentFolder) && [_oneDriveController isAuthorized]) {
         if ([_oneDriveController.rootFolder.name isEqualToString:_oneDriveController.currentFolder.parent.name]) {
             _oneDriveController.currentFolder = nil;
             self.title = _oneDriveController.rootFolder.name;