Commit bc43694c authored by Felix Paul Kühne's avatar Felix Paul Kühne

clouds: cosmetics

(cherry picked from commit 9c09939f)
parent 0bcbb1e4
...@@ -155,9 +155,9 @@ ...@@ -155,9 +155,9 @@
* and pass the final location to libvlc, which does not require a custom HTTP header */ * and pass the final location to libvlc, which does not require a custom HTTP header */
NSURL *baseURL = [[[BoxSDK sharedSDK] filesManager] URLWithResource:@"files" NSURL *baseURL = [[[BoxSDK sharedSDK] filesManager] URLWithResource:@"files"
ID:file.modelID ID:file.modelID
subresource:@"content" subresource:@"content"
subID:nil]; subID:nil];
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:baseURL NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:baseURL
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
......
...@@ -43,34 +43,34 @@ ...@@ -43,34 +43,34 @@
self.cloudStorageLogo.center = self.view.center; self.cloudStorageLogo.center = self.view.center;
// Handle logged in // Handle logged in
[[NSNotificationCenter defaultCenter] addObserver:self NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
selector:@selector(boxApiTokenDidRefresh) [defaultCenter addObserver:self
name:BoxOAuth2SessionDidRefreshTokensNotification selector:@selector(boxApiTokenDidRefresh)
object:[BoxSDK sharedSDK].OAuth2Session]; name:BoxOAuth2SessionDidRefreshTokensNotification
object:[BoxSDK sharedSDK].OAuth2Session];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(boxApiTokenDidRefresh) [defaultCenter addObserver:self
name:BoxOAuth2SessionDidBecomeAuthenticatedNotification selector:@selector(boxApiTokenDidRefresh)
object:[BoxSDK sharedSDK].OAuth2Session]; name:BoxOAuth2SessionDidBecomeAuthenticatedNotification
object:[BoxSDK sharedSDK].OAuth2Session];
// Handle logout // Handle logout
[[NSNotificationCenter defaultCenter] addObserver:self [defaultCenter addObserver:self
selector:@selector(boxDidGetLoggedOut) selector:@selector(boxDidGetLoggedOut)
name:BoxOAuth2SessionDidReceiveAuthenticationErrorNotification name:BoxOAuth2SessionDidReceiveAuthenticationErrorNotification
object:[BoxSDK sharedSDK].OAuth2Session]; object:[BoxSDK sharedSDK].OAuth2Session];
[[NSNotificationCenter defaultCenter] addObserver:self [defaultCenter addObserver:self
selector:@selector(boxDidGetLoggedOut) selector:@selector(boxDidGetLoggedOut)
name:BoxOAuth2SessionDidReceiveRefreshErrorNotification name:BoxOAuth2SessionDidReceiveRefreshErrorNotification
object:[BoxSDK sharedSDK].OAuth2Session]; object:[BoxSDK sharedSDK].OAuth2Session];
[[NSNotificationCenter defaultCenter] addObserver:self [defaultCenter addObserver:self
selector:@selector(boxAPIAuthenticationDidFail) selector:@selector(boxAPIAuthenticationDidFail)
name:BoxOAuth2SessionDidReceiveAuthenticationErrorNotification name:BoxOAuth2SessionDidReceiveAuthenticationErrorNotification
object:[BoxSDK sharedSDK].OAuth2Session]; object:[BoxSDK sharedSDK].OAuth2Session];
[[NSNotificationCenter defaultCenter] addObserver:self [defaultCenter addObserver:self
selector:@selector(boxAPIInitiateLogin) selector:@selector(boxAPIInitiateLogin)
name:BoxOAuth2SessionDidReceiveRefreshErrorNotification name:BoxOAuth2SessionDidReceiveRefreshErrorNotification
object:[BoxSDK sharedSDK].OAuth2Session]; object:[BoxSDK sharedSDK].OAuth2Session];
} }
- (UIViewController *)createAuthController - (UIViewController *)createAuthController
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VLCCloudStorageTableViewCell.h * VLCCloudStorageTableViewCell.h
* VLC for iOS * VLC for iOS
***************************************************************************** *****************************************************************************
* Copyright (c) 2013 VideoLAN. All rights reserved. * Copyright (c) 2013-2015 VideoLAN. All rights reserved.
* $Id$ * $Id$
* *
* Authors: Felix Paul Kühne <fkuehne # videolan.org> * Authors: Felix Paul Kühne <fkuehne # videolan.org>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
@property (nonatomic, strong) IBOutlet UIImageView *thumbnailView; @property (nonatomic, strong) IBOutlet UIImageView *thumbnailView;
@property (nonatomic, strong) IBOutlet UIButton *downloadButton; @property (nonatomic, strong) IBOutlet UIButton *downloadButton;
@property (nonatomic, retain) DBMetadata *fileMetadata; @property (nonatomic, retain) DBMetadata *dropboxFile;
@property (nonatomic, retain) GTLDriveFile *driveFile; @property (nonatomic, retain) GTLDriveFile *driveFile;
@property (nonatomic, retain) BoxItem *boxFile; @property (nonatomic, retain) BoxItem *boxFile;
@property (nonatomic, retain) VLCOneDriveObject *oneDriveFile; @property (nonatomic, retain) VLCOneDriveObject *oneDriveFile;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VLCCloudStorageTableViewCell.m * VLCCloudStorageTableViewCell.m
* VLC for iOS * VLC for iOS
***************************************************************************** *****************************************************************************
* Copyright (c) 2013 VideoLAN. All rights reserved. * Copyright (c) 2013-2015 VideoLAN. All rights reserved.
* $Id$ * $Id$
* *
* Authors: Carola Nitz <nitz.carola # googlemail.com> * Authors: Carola Nitz <nitz.carola # googlemail.com>
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
return cell; return cell;
} }
- (void)setFileMetadata:(DBMetadata *)fileMetadata - (void)setDropboxFile:(DBMetadata *)dropboxFile
{ {
if (fileMetadata != _fileMetadata) if (dropboxFile != _dropboxFile)
_fileMetadata = fileMetadata; _dropboxFile = dropboxFile;
[self _updatedDisplayedInformation]; [self _updatedDisplayedInformation];
} }
...@@ -64,19 +64,19 @@ ...@@ -64,19 +64,19 @@
- (void)_updatedDisplayedInformation - (void)_updatedDisplayedInformation
{ {
if (_fileMetadata != nil) { if (_dropboxFile != nil) {
if (self.fileMetadata.isDirectory) { if (self.dropboxFile.isDirectory) {
self.folderTitleLabel.text = self.fileMetadata.filename; self.folderTitleLabel.text = self.dropboxFile.filename;
self.titleLabel.hidden = self.subtitleLabel.hidden = YES; self.titleLabel.hidden = self.subtitleLabel.hidden = YES;
self.folderTitleLabel.hidden = NO; self.folderTitleLabel.hidden = NO;
} else { } else {
self.titleLabel.text = self.fileMetadata.filename; self.titleLabel.text = self.dropboxFile.filename;
self.subtitleLabel.text = (self.fileMetadata.totalBytes > 0) ? self.fileMetadata.humanReadableSize : @""; self.subtitleLabel.text = (self.dropboxFile.totalBytes > 0) ? self.dropboxFile.humanReadableSize : @"";
self.titleLabel.hidden = self.subtitleLabel.hidden = NO; self.titleLabel.hidden = self.subtitleLabel.hidden = NO;
self.folderTitleLabel.hidden = YES; self.folderTitleLabel.hidden = YES;
} }
NSString *iconName = self.fileMetadata.icon; NSString *iconName = self.dropboxFile.icon;
if ([iconName isEqualToString:@"folder_user"] || [iconName isEqualToString:@"folder"] || [iconName isEqualToString:@"folder_public"] || [iconName isEqualToString:@"folder_photos"] || [iconName isEqualToString:@"package"]) { if ([iconName isEqualToString:@"folder_user"] || [iconName isEqualToString:@"folder"] || [iconName isEqualToString:@"folder_public"] || [iconName isEqualToString:@"folder_photos"] || [iconName isEqualToString:@"package"]) {
self.thumbnailView.image = [UIImage imageNamed:@"folder"]; self.thumbnailView.image = [UIImage imageNamed:@"folder"];
self.downloadButton.hidden = YES; self.downloadButton.hidden = YES;
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
self.thumbnailView.image = [UIImage imageNamed:@"audio"]; self.thumbnailView.image = [UIImage imageNamed:@"audio"];
else { else {
self.thumbnailView.image = [UIImage imageNamed:@"blank"]; self.thumbnailView.image = [UIImage imageNamed:@"blank"];
APLog(@"missing icon for type '%@'", self.fileMetadata.icon); APLog(@"missing icon for type '%@'", self.dropboxFile.icon);
} }
} else if(_driveFile != nil){ } else if(_driveFile != nil){
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
if (cell == nil) if (cell == nil)
cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier]; cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier];
cell.fileMetadata = _dropboxController.currentListFiles[indexPath.row]; cell.dropboxFile = _dropboxController.currentListFiles[indexPath.row];
cell.delegate = self; cell.delegate = self;
return cell; return cell;
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
#pragma mark - VLCCloudStorageTableViewCell delegation #pragma mark - VLCCloudStorageTableViewCell delegation
- (void)triggerDownloadForCell:(VLCCloudStorageTableViewCell *)cell - (void)triggerDownloadForCell:(VLCCloudStorageTableViewCell *)cell
{ {
_selectedFile = _dropboxController.currentListFiles[[self.tableView indexPathForCell:cell].row]; _selectedFile = _dropboxController.currentListFiles[[self.tableView indexPathForCell:cell].row];
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
* Refer to the COPYING file of the official project for license. * Refer to the COPYING file of the official project for license.
*****************************************************************************/ *****************************************************************************/
#import "VLCOneDriveController.h" #import "VLCOneDriveController.h"
#import "VLCOneDriveConstants.h" #import "VLCOneDriveConstants.h"
#import "VLCOneDriveObject.h" #import "VLCOneDriveObject.h"
...@@ -24,7 +23,6 @@ ...@@ -24,7 +23,6 @@
@interface VLCOneDriveController () <LiveAuthDelegate, VLCOneDriveObjectDelegate, VLCOneDriveObjectDownloadDelegate> @interface VLCOneDriveController () <LiveAuthDelegate, VLCOneDriveObjectDelegate, VLCOneDriveObjectDownloadDelegate>
{ {
LiveConnectClient *_liveClient; LiveConnectClient *_liveClient;
//VLCOneDriveObject *_folderiD;
NSString *_folderId; NSString *_folderId;
NSArray *_liveScopes; NSArray *_liveScopes;
BOOL _activeSession; BOOL _activeSession;
......
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