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

clouds: cosmetics

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