[vlc-commits] [Git][videolan/vlc][master] macosx: Implement library item presentation for collection view in VLCLibraryVideoViewController
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Thu Nov 27 18:52:29 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
925cf7fd by Claudio Cambra at 2025-11-27T18:46:35+01:00
macosx: Implement library item presentation for collection view in VLCLibraryVideoViewController
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m
Changes:
=====================================
modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m
=====================================
@@ -427,10 +427,16 @@
- (void)presentLibraryItemWaitForCollectionViewDataSourceFinished:(NSNotification *)notification
{
[NSNotificationCenter.defaultCenter removeObserver:self
- name:VLCLibraryVideoCollectionViewDataSourceDisplayedCollectionChangedNotification
+ name:VLCLibraryVideoDataSourceDisplayedCollectionChangedNotification
object:self.libraryVideoDataSource];
- // TODO: Present for collection view
+ NSIndexPath * const indexPath = [self.libraryVideoDataSource indexPathForLibraryItem:_awaitingPresentingLibraryItem];
+ if (indexPath != nil) {
+ NSSet * const indexPathSet = [NSSet setWithObject:indexPath];
+ [self.videoLibraryCollectionView selectItemsAtIndexPaths:indexPathSet scrollPosition:NSCollectionViewScrollPositionTop];
+ [self.videoLibraryCollectionView scrollToItemsAtIndexPaths:indexPathSet scrollPosition:NSCollectionViewScrollPositionTop];
+ }
+
_awaitingPresentingLibraryItem = nil;
}
@@ -462,14 +468,14 @@
if (viewModeSegment == VLCLibraryGridViewModeSegment) {
[NSNotificationCenter.defaultCenter addObserver:self
- selector:@selector(presentLibraryItemWaitForTableViewDataSourceFinished:)
+ selector:@selector(presentLibraryItemWaitForCollectionViewDataSourceFinished:)
name:VLCLibraryVideoDataSourceDisplayedCollectionChangedNotification
object:self.libraryVideoDataSource];
} else if (viewModeSegment == VLCLibraryListViewModeSegment) {
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(presentLibraryItemWaitForTableViewDataSourceFinished:)
- name:VLCLibraryVideoCollectionViewDataSourceDisplayedCollectionChangedNotification
+ name:VLCLibraryVideoDataSourceDisplayedCollectionChangedNotification
object:self.libraryVideoDataSource];
} else {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/925cf7fd8ea94d39e01b1aedd04138f7348ec575
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/925cf7fd8ea94d39e01b1aedd04138f7348ec575
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list