Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
9dc9d4d9
Commit
9dc9d4d9
authored
Jul 09, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dropbox: fix re-occurant issue that another file than the user indicated was being downloaded
parent
c9eabc13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
AspenProject/VLCDropboxTableViewController.m
AspenProject/VLCDropboxTableViewController.m
+10
-8
No files found.
AspenProject/VLCDropboxTableViewController.m
View file @
9dc9d4d9
...
...
@@ -27,6 +27,7 @@
UIProgressView
*
_progressView
;
UIActivityIndicatorView
*
_activityIndicator
;
DBMetadata
*
_selectedFile
;
}
@end
...
...
@@ -146,15 +147,16 @@
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
DBMetadata
*
selectedFile
=
_dropboxController
.
currentListFiles
[
indexPath
.
row
];
if
(
!
selectedFile
.
isDirectory
)
{
_
selectedFile
=
_dropboxController
.
currentListFiles
[
indexPath
.
row
];
if
(
!
_
selectedFile
.
isDirectory
)
{
/* selected item is a proper file, ask the user if s/he wants to download it */
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"DROPBOX_DOWNLOAD"
,
@""
)
message
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"DROPBOX_DL_LONG"
,
@""
),
selectedFile
.
filename
,
[[
UIDevice
currentDevice
]
model
]]
delegate
:
self
cancelButtonTitle
:
NSLocalizedString
(
@"BUTTON_CANCEL"
,
@""
)
otherButtonTitles
:
NSLocalizedString
(
@"BUTTON_DOWNLOAD"
,
@""
),
nil
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"DROPBOX_DOWNLOAD"
,
@""
)
message
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"DROPBOX_DL_LONG"
,
@""
),
_
selectedFile
.
filename
,
[[
UIDevice
currentDevice
]
model
]]
delegate
:
self
cancelButtonTitle
:
NSLocalizedString
(
@"BUTTON_CANCEL"
,
@""
)
otherButtonTitles
:
NSLocalizedString
(
@"BUTTON_DOWNLOAD"
,
@""
),
nil
];
[
alert
show
];
}
else
{
/* dive into subdirectory */
_currentPath
=
[
_currentPath
stringByAppendingFormat
:
@"/%@"
,
selectedFile
.
filename
];
_currentPath
=
[
_currentPath
stringByAppendingFormat
:
@"/%@"
,
_
selectedFile
.
filename
];
[
self
_requestInformationForCurrentPath
];
_selectedFile
=
nil
;
}
[
self
.
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
NO
];
...
...
@@ -162,10 +164,10 @@
-
(
void
)
alertView
:(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
1
)
{
DBMetadata
*
selectedFile
=
_dropboxController
.
currentListFiles
[
self
.
tableView
.
indexPathForSelectedRow
.
row
];
[
_dropboxController
downloadFileToDocumentFolder
:
selectedFile
];
}
if
(
buttonIndex
==
1
)
[
_dropboxController
downloadFileToDocumentFolder
:
_selectedFile
];
_selectedFile
=
nil
;
}
#pragma mark - dropbox controller delegate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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