Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
64ef62bf
Commit
64ef62bf
authored
Oct 22, 2015
by
Felix Paul Kühne
Browse files
dropbox table view controller: Added support for ATV
parent
a28cf2ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCDropboxTableViewController.m
View file @
64ef62bf
...
...
@@ -16,9 +16,14 @@
#import "VLCDropboxTableViewController.h"
#import "VLCDropboxController.h"
#import "VLCAppDelegate.h"
#import "VLCDropboxConstants.h"
#import "VLCCloudStorageTableViewCell.h"
#import "UIDevice+VLC.h"
#import "DBKeychain.h"
#if TARGET_OS_IOS
#import "VLCAppDelegate.h"
#endif
@interface
VLCDropboxTableViewController
()
<
VLCCloudStorageTableViewCell
>
{
...
...
@@ -43,10 +48,12 @@
self
.
controller
=
_dropboxController
;
self
.
controller
.
delegate
=
self
;
#if TARGET_OS_IOS
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
sessionWasUpdated
:)
name:
VLCDropboxSessionWasAuthorized
object:
nil
];
#endif
DBSession
*
dbSession
=
[[
DBSession
alloc
]
initWithAppKey
:
kVLCDropboxAppKey
appSecret
:
kVLCDropboxPrivateKey
root
:
kDBRootDropbox
];
[
DBSession
setSharedSession
:
dbSession
];
...
...
@@ -113,14 +120,6 @@
[
self
.
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
NO
];
}
-
(
void
)
alertView
:(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
1
)
[
_dropboxController
downloadFileToDocumentFolder
:
_selectedFile
];
_selectedFile
=
nil
;
}
#pragma mark - login dialog
-
(
IBAction
)
loginAction
:(
id
)
sender
...
...
@@ -136,10 +135,13 @@
{
self
.
authorizationInProgress
=
YES
;
[
self
updateViewAfterSessionChange
];
[
_dropboxController
shareCredentials
];
}
#pragma mark - VLCCloudStorageTableViewCell delegation
#if TARGET_OS_IOS
-
(
void
)
triggerDownloadForCell
:(
VLCCloudStorageTableViewCell
*
)
cell
{
_selectedFile
=
_dropboxController
.
currentListFiles
[[
self
.
tableView
indexPathForCell
:
cell
].
row
];
...
...
@@ -162,4 +164,14 @@
}
}
-
(
void
)
alertView
:(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
1
)
[
_dropboxController
downloadFileToDocumentFolder
:
_selectedFile
];
_selectedFile
=
nil
;
}
#endif
@end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment