Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
c6e07e23
Commit
c6e07e23
authored
Jan 15, 2018
by
Carola
Browse files
VLCLibraryViewController: simplify code and fix playing wrong media when searching
parent
e9870f66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCLibraryViewController.m
View file @
c6e07e23
...
...
@@ -571,8 +571,9 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
if
([(
VLCPlaylistTableViewCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
]
isExpanded
])
{
[(
VLCPlaylistTableViewCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
]
collapsWithAnimation
:
YES
];
VLCPlaylistTableViewCell
*
playlistTableViewCell
=
(
VLCPlaylistTableViewCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
if
([
playlistTableViewCell
isExpanded
])
{
[
playlistTableViewCell
collapsWithAnimation
:
YES
];
return
;
}
...
...
@@ -594,10 +595,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
}
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
NSManagedObject
*
selectedObject
=
[
_mediaDataSource
objectAtIndex
:
indexPath
.
row
];
if
(
selectedObject
!=
nil
)
[
self
openMediaObject
:
selectedObject
];
[
self
openMediaObject
:
playlistTableViewCell
.
mediaObject
];
}
#pragma mark - Gesture Action
...
...
Write
Preview
Supports
Markdown
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