Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
f851154b
Commit
f851154b
authored
May 12, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly delete media files when requested by user (close #8591)
parent
a45b1e64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
AspenProject/VLCPlaylistViewController.m
AspenProject/VLCPlaylistViewController.m
+5
-1
No files found.
AspenProject/VLCPlaylistViewController.m
View file @
f851154b
...
...
@@ -108,8 +108,12 @@
-
(
void
)
tableView
:(
UITableView
*
)
tableView
commitEditingStyle
:(
UITableViewCellEditingStyle
)
editingStyle
forRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
if
(
editingStyle
==
UITableViewCellEditingStyleDelete
)
{
[
_foundMedia
removeObjectAtIndex
:
indexPath
.
row
];
NSUInteger
row
=
indexPath
.
row
;
MLFile
*
mediaObject
=
_foundMedia
[
row
];
[[
NSFileManager
defaultManager
]
removeItemAtPath
:[[
NSURL
URLWithString
:
mediaObject
.
url
]
path
]
error
:
nil
];
[
_foundMedia
removeObjectAtIndex
:
row
];
[
self
.
tableView
deleteRowsAtIndexPaths
:@[
indexPath
]
withRowAnimation
:
UITableViewRowAnimationFade
];
[
self
.
gridView
deleteItemsAtIndices
:[
NSIndexSet
indexSetWithIndex
:
row
]
withAnimation
:
AQGridViewItemAnimationFade
];
}
else
if
(
editingStyle
==
UITableViewCellEditingStyleInsert
)
{
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
}
...
...
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