[vlc-commits] [Git][videolan/vlc][master] 6 commits: macosx: only invalidate collection view layout fully on width changes
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Thu Apr 16 11:38:22 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
2eb3aeb0 by Felix Paul Kühne at 2026-04-16T11:28:23+02:00
macosx: only invalidate collection view layout fully on width changes
Pure vertical scrolling no longer triggers a full layout invalidation
with delegate metrics re-query. This avoids expensive per-frame item
size recalculations when scrolling through large media libraries.
- - - - -
5d2ba91c by Felix Paul Kühne at 2026-04-16T11:28:23+02:00
macosx: coalesce cache drop into a single notification
When sort order or filter changes, dropCaches now posts one
VLCLibraryModelAllCachesDropped notification instead of 12 individual
reset notifications. Each data source observes this single notification
and reloads once. Also use vlc_ml_list_favorite_media for the
all-favorites list instead of merging and re-sorting in the UI.
Skip reloadData on audio library views whose dataSource is not active.
- - - - -
ae2a44d9 by Felix Paul Kühne at 2026-04-16T11:28:23+02:00
macosx: fix constraint conflicts in collection view item
Use constraint activation/deactivation instead of priority swapping
for the unplayed indicator. Fix the stale nib outlet for the indicator
constraint. Toggle the 1:1 and video aspect ratio constraints as a
mutually exclusive pair to prevent conflicting constraints. Guard all
constraint changes with state checks to skip unnecessary Auto Layout
engine invalidation.
- - - - -
7241638b by Felix Paul Kühne at 2026-04-16T11:28:23+02:00
macosx: compute album row height from data instead of creating cell views
The heightOfRow delegate was creating a full cell view (with nested
table view) just to read its height property. Compute the height
directly from the album track count using a class method instead.
- - - - -
f2ca475c by Felix Paul Kühne at 2026-04-16T11:28:23+02:00
macosx: fix crash in home view stack controller dealloc
Do not manually clear subviews during dealloc as the view hierarchy
may already be partially deallocated, causing the Auto Layout engine
to message freed objects. The subviews are cleaned up automatically.
- - - - -
159c9ccf by Felix Paul Kühne at 2026-04-16T11:28:23+02:00
macosx: fix KVO crash on deactivation in collection view item
Replace KVO observer on NSApplication effectiveAppearance with
viewDidChangeEffectiveAppearance override. The KVO approach could
crash when the observer was deallocated before the notification
was delivered.
- - - - -
18 changed files:
- modules/gui/macosx/UI/VLCLibraryCollectionViewItem.xib
- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
- modules/gui/macosx/library/VLCLibraryHeroView.m
- modules/gui/macosx/library/VLCLibraryModel.h
- modules/gui/macosx/library/VLCLibraryModel.m
- modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.h
- modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableViewDelegate.m
- modules/gui/macosx/library/favorites-library/VLCLibraryFavoritesDataSource.m
- modules/gui/macosx/library/favorites-library/VLCLibraryFavoritesViewController.m
- modules/gui/macosx/library/home-library/VLCLibraryHomeViewController.m
- modules/gui/macosx/library/home-library/VLCLibraryHomeViewStackViewController.m
- modules/gui/macosx/library/home-library/VLCLibraryHomeViewVideoContainerViewDataSource.m
- modules/gui/macosx/library/video-library/VLCLibraryVideoDataSource.m
- modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m
Changes:
=====================================
modules/gui/macosx/UI/VLCLibraryCollectionViewItem.xib
=====================================
@@ -17,7 +17,7 @@
<outlet property="playInstantlyButton" destination="S3I-5Z-qgS" id="JlC-bE-i5Y"/>
<outlet property="progressIndicator" destination="dFt-oZ-h9P" id="JC6-gk-Mid"/>
<outlet property="secondaryInfoTextField" destination="VAn-gF-QiZ" id="U8T-Cs-HaL"/>
- <outlet property="trailingSecondaryTextToLeadingAnnotationConstraint" destination="IXL-bv-5zP" id="V4J-bi-UQB"/>
+ <outlet property="trailingSecondaryTextToLeadingUnplayedIndicatorConstraint" destination="IXL-bv-5zP" id="V4J-bi-UQB"/>
<outlet property="trailingSecondaryTextToTrailingSuperviewConstraint" destination="Zci-25-m59" id="czo-El-QT8"/>
<outlet property="unplayedIndicatorTextField" destination="u2r-zy-XEW" id="56s-K4-Kxr"/>
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
=====================================
@@ -71,6 +71,7 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
CGFloat _prevProvidedAnimationStep;
BOOL _invalidateAll;
+ CGFloat _previousWidth;
}
@property (nonatomic, readwrite) BOOL detailViewIsAnimating;
@@ -256,9 +257,16 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
- (BOOL)shouldInvalidateLayoutForBoundsChange:(NSRect)newBounds
{
- [super shouldInvalidateLayoutForBoundsChange:newBounds];
- _invalidateAll = YES;
- return YES;
+ const BOOL superResult = [super shouldInvalidateLayoutForBoundsChange:newBounds];
+ const CGFloat newWidth = newBounds.size.width;
+
+ if (newWidth != _previousWidth) {
+ _invalidateAll = YES;
+ _previousWidth = newWidth;
+ return YES;
+ }
+
+ return superResult || _selectedIndexPath != nil;
}
- (void)invalidateLayoutWithContext:(NSCollectionViewLayoutInvalidationContext *)context
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
=====================================
@@ -107,9 +107,6 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
- (void)dealloc
{
[NSNotificationCenter.defaultCenter removeObserver:self];
- if (@available(macOS 10.14, *)) {
- [NSApplication.sharedApplication removeObserver:self forKeyPath:@"effectiveAppearance"];
- }
}
- (void)awakeFromNib
@@ -157,28 +154,15 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
self.highlightBox.borderColor = NSColor.VLCAccentColor;
self.unplayedIndicatorTextField.textColor = NSColor.VLCAccentColor;
- if (@available(macOS 10.14, *)) {
- [NSApplication.sharedApplication addObserver:self
- forKeyPath:@"effectiveAppearance"
- options:NSKeyValueObservingOptionNew
- context:nil];
- }
-
[self updateColoredAppearance:self.view.effectiveAppearance];
[self prepareForReuse];
}
#pragma mark - dynamic appearance
-- (void)observeValueForKeyPath:(NSString *)keyPath
- ofObject:(id)object
- change:(NSDictionary<NSKeyValueChangeKey,id> *)change
- context:(void *)context
+- (void)viewDidChangeEffectiveAppearance
{
- if ([keyPath isEqualToString:@"effectiveAppearance"]) {
- NSAppearance *effectiveAppearance = change[NSKeyValueChangeNewKey];
- [self updateColoredAppearance:effectiveAppearance];
- }
+ [self updateColoredAppearance:self.view.effectiveAppearance];
}
- (void)updateColoredAppearance:(NSAppearance*)appearance
@@ -258,9 +242,15 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
VLCMediaLibraryTrack * const videoTrack = mediaItem.firstVideoTrack;
[self showVideoSizeIfNeededForWidth:videoTrack.videoWidth
andHeight:videoTrack.videoHeight];
- _videoImageViewAspectRatioConstraint.active = YES;
+ if (!_videoImageViewAspectRatioConstraint.active) {
+ self.imageViewAspectRatioConstraint.active = NO;
+ _videoImageViewAspectRatioConstraint.active = YES;
+ }
} else {
- _videoImageViewAspectRatioConstraint.active = NO;
+ if (_videoImageViewAspectRatioConstraint.active) {
+ _videoImageViewAspectRatioConstraint.active = NO;
+ self.imageViewAspectRatioConstraint.active = YES;
+ }
}
const CGFloat position = mediaItem.progress;
@@ -275,7 +265,10 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
}
} else {
self.progressIndicator.hidden = YES;
- _videoImageViewAspectRatioConstraint.active = NO;
+ if (_videoImageViewAspectRatioConstraint.active) {
+ _videoImageViewAspectRatioConstraint.active = NO;
+ self.imageViewAspectRatioConstraint.active = YES;
+ }
}
}
@@ -292,14 +285,14 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
- (void)setUnplayedIndicatorHidden:(BOOL)indicatorHidden
{
- _unplayedIndicatorTextField.hidden = indicatorHidden;
+ if (_unplayedIndicatorTextField.hidden == indicatorHidden) {
+ return;
+ }
- // Set priority of constraints for secondary info label, which is alongside unplayed indicator
- const NSLayoutPriority superViewConstraintPriority = indicatorHidden ? NSLayoutPriorityRequired : NSLayoutPriorityDefaultLow;
- const NSLayoutPriority unplayedIndicatorConstraintPriority = indicatorHidden ? NSLayoutPriorityDefaultLow : NSLayoutPriorityRequired;
+ _unplayedIndicatorTextField.hidden = indicatorHidden;
- _trailingSecondaryTextToTrailingSuperviewConstraint.priority = superViewConstraintPriority;
- _trailingSecondaryTextToLeadingUnplayedIndicatorConstraint.priority = unplayedIndicatorConstraintPriority;
+ _trailingSecondaryTextToLeadingUnplayedIndicatorConstraint.active = !indicatorHidden;
+ _trailingSecondaryTextToTrailingSuperviewConstraint.active = indicatorHidden;
}
#pragma mark - actions
=====================================
modules/gui/macosx/library/VLCLibraryHeroView.m
=====================================
@@ -165,6 +165,10 @@
selector:@selector(newVideosAvailable:)
name:VLCLibraryModelRecentsMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(newVideosAvailable:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
}
- (void)disconnectForNewVideo
@@ -172,6 +176,7 @@
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter removeObserver:self name:VLCLibraryModelVideoMediaListReset object:nil];
[notificationCenter removeObserver:self name:VLCLibraryModelRecentsMediaListReset object:nil];
+ [notificationCenter removeObserver:self name:VLCLibraryModelAllCachesDropped object:nil];
}
- (void)newVideosAvailable:(NSNotification *)notification
=====================================
modules/gui/macosx/library/VLCLibraryModel.h
=====================================
@@ -34,6 +34,7 @@ extern NSString * const VLCLibraryModelPlaylistAdded;
extern NSString * const VLCLibraryModelListOfMonitoredFoldersUpdated;
extern NSString * const VLCLibraryModelMediaItemThumbnailGenerated;
+extern NSString * const VLCLibraryModelAllCachesDropped;
extern NSString * const VLCLibraryModelAudioMediaListReset;
extern NSString * const VLCLibraryModelVideoMediaListReset;
extern NSString * const VLCLibraryModelFavoriteAudioMediaListReset;
=====================================
modules/gui/macosx/library/VLCLibraryModel.m
=====================================
@@ -36,6 +36,7 @@ NSString * const VLCLibraryModelGenreListReset = @"VLCLibraryModelGenreListReset
NSString * const VLCLibraryModelListOfMonitoredFoldersUpdated = @"VLCLibraryModelListOfMonitoredFoldersUpdated";
NSString * const VLCLibraryModelMediaItemThumbnailGenerated = @"VLCLibraryModelMediaItemThumbnailGenerated";
+NSString * const VLCLibraryModelAllCachesDropped = @"VLCLibraryModelAllCachesDropped";
NSString * const VLCLibraryModelAudioMediaListReset = @"VLCLibraryModelAudioMediaListReset";
NSString * const VLCLibraryModelVideoMediaListReset = @"VLCLibraryModelVideoMediaListReset";
NSString * const VLCLibraryModelFavoriteAudioMediaListReset = @"VLCLibraryModelFavoriteAudioMediaListReset";
@@ -1035,18 +1036,7 @@ static void libraryCallback(void *p_data, const vlc_ml_event_t *p_event)
_cachedRecentMedia = nil;
_cachedRecentAudioMedia = nil;
- [self.changeDelegate notifyChange:VLCLibraryModelVideoMediaListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelAudioMediaListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelAlbumListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelArtistListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelGenreListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelRecentsMediaListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelRecentAudioMediaListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelFavoriteVideoMediaListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelFavoriteAudioMediaListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelFavoriteAlbumsListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelFavoriteArtistsListReset withObject:self];
- [self.changeDelegate notifyChange:VLCLibraryModelFavoriteGenresListReset withObject:self];
+ [self.changeDelegate notifyChange:VLCLibraryModelAllCachesDropped withObject:self];
}
- (void)performActionOnMediaItemInCache:(const int64_t)libraryId
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.h
=====================================
@@ -27,6 +27,7 @@
NS_ASSUME_NONNULL_BEGIN
@class VLCImageView;
+ at class VLCMediaLibraryAlbum;
@class VLCTrackingView;
@class VLCLibraryRepresentedItem;
@@ -38,6 +39,7 @@ extern NSString * const VLCLibraryAlbumTableCellTableViewColumnIdentifier;
@property (class, readonly) CGFloat defaultHeight;
+ (instancetype)fromNibWithOwner:(id)owner;
++ (CGFloat)heightForAlbum:(VLCMediaLibraryAlbum *)album;
@property (readwrite, weak) IBOutlet VLCTrackingView *trackingView;
@property (readwrite, weak) IBOutlet VLCImageView *representedImageView;
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
=====================================
@@ -92,6 +92,32 @@ const CGFloat VLCLibraryAlbumTableCellViewDefaultHeight = 168.;
return VLCLibraryAlbumTableCellViewDefaultHeight;
}
++ (CGFloat)heightForAlbum:(VLCMediaLibraryAlbum *)album
+{
+ static CGFloat albumNameHeight;
+ static CGFloat artistNameHeight;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ VLCLibraryAlbumTableCellView *prototype = [VLCLibraryAlbumTableCellView fromNibWithOwner:NSNull.null];
+ albumNameHeight = prototype.albumNameTextField.intrinsicContentSize.height;
+ artistNameHeight = prototype.artistNameTextButton.intrinsicContentSize.height;
+ });
+
+ const NSUInteger numberOfTracks = album.numberOfTracks;
+ const CGFloat intercellSpacing = numberOfTracks > 1 ? (numberOfTracks - 1) * 1. : 0;
+ const CGFloat tracksHeight = numberOfTracks * VLCLibraryInternalMediaItemRowHeight + intercellSpacing + VLCLibraryUIUnits.mediumSpacing;
+
+ const CGFloat titleAndTableViewHeight = VLCLibraryUIUnits.largeSpacing +
+ albumNameHeight +
+ VLCLibraryUIUnits.smallSpacing +
+ artistNameHeight +
+ VLCLibraryUIUnits.smallSpacing +
+ tracksHeight +
+ VLCLibraryUIUnits.largeSpacing;
+
+ return MAX(titleAndTableViewHeight, VLCLibraryAlbumTableCellViewDefaultHeight);
+}
+
- (CGFloat)height
{
if (self.representedItem == nil) {
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
=====================================
@@ -342,6 +342,10 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
selector:@selector(libraryModelAudioMediaItemsReset:)
name:VLCLibraryModelAudioMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelReset:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemUpdated:)
name:VLCLibraryModelAudioMediaItemUpdated
@@ -549,11 +553,21 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
self->_displayedCollectionUpdating = NO;
[self resetLayoutsForOperation:^{
- [self.collectionView reloadData];
- [self.gridModeListTableView reloadData];
- [self.collectionSelectionTableView reloadData];
- [self.songsTableView reloadData];
- [self.carouselView reloadData];
+ if (self.collectionView.dataSource == self) {
+ [self.collectionView reloadData];
+ }
+ if (self.gridModeListTableView.dataSource == self) {
+ [self.gridModeListTableView reloadData];
+ }
+ if (self.collectionSelectionTableView.dataSource == self) {
+ [self.collectionSelectionTableView reloadData];
+ }
+ if (self.songsTableView.dataSource == self) {
+ [self.songsTableView reloadData];
+ }
+ if (self.carouselView.dataSource == self) {
+ [self.carouselView reloadData];
+ }
}];
[NSNotificationCenter.defaultCenter postNotificationName:VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification object:self];
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
=====================================
@@ -101,6 +101,10 @@
selector:@selector(libraryModelAudioMediaItemsReset:)
name:VLCLibraryModelAudioMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelAudioMediaItemsReset:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelAudioMediaItemUpdated:)
name:VLCLibraryModelAudioMediaItemUpdated
@@ -252,7 +256,9 @@
{
NSArray<NSTableView *> * const tableViews = self.tableViews;
for (NSTableView * const tableView in tableViews) {
- [tableView reloadData];
+ if (tableView.dataSource == self) {
+ [tableView reloadData];
+ }
}
}
@@ -260,6 +266,9 @@
{
NSArray<NSCollectionView *> * const collectionViews = self.collectionViews;
for (NSCollectionView * const collectionView in collectionViews) {
+ if (collectionView.dataSource != self) {
+ continue;
+ }
NSCollectionViewLayout * const collectionViewLayout = collectionView.collectionViewLayout;
if ([collectionViewLayout isKindOfClass:VLCLibraryCollectionViewFlowLayout.class]) {
[(VLCLibraryCollectionViewFlowLayout *)collectionViewLayout resetLayout];
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableViewDelegate.m
=====================================
@@ -25,6 +25,7 @@
#import "VLCLibraryAlbumTableCellView.h"
#import "VLCLibraryAudioDataSource.h"
+#import "library/VLCLibraryDataTypes.h"
#import "library/VLCLibraryTableCellView.h"
@implementation VLCLibraryAudioGroupTableViewDelegate
@@ -48,11 +49,13 @@
- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row
{
- NSTableColumn *column = [[NSTableColumn alloc] initWithIdentifier:VLCLibraryAlbumTableCellTableViewColumnIdentifier];
- VLCLibraryAlbumTableCellView *cellView = (VLCLibraryAlbumTableCellView *)[self tableView:tableView
- viewForTableColumn:column
- row:row];
- return cellView == nil ? -1 : cellView.height;
+ id dataSource = tableView.dataSource;
+ id libraryItem = [dataSource libraryItemAtRow:row forTableView:tableView];
+
+ if ([libraryItem isKindOfClass:[VLCMediaLibraryAlbum class]]) {
+ return [VLCLibraryAlbumTableCellView heightForAlbum:libraryItem];
+ }
+ return VLCLibraryAlbumTableCellView.defaultHeight;
}
@end
=====================================
modules/gui/macosx/library/favorites-library/VLCLibraryFavoritesDataSource.m
=====================================
@@ -240,6 +240,10 @@ NSString * const VLCLibraryFavoritesDataSourceDisplayedCollectionChangedNotifica
selector:@selector(libraryModelFavoriteListReset:)
name:VLCLibraryModelFavoriteVideoMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelFavoriteListReset:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelFavoriteListReset:)
name:VLCLibraryModelFavoriteAudioMediaListReset
=====================================
modules/gui/macosx/library/favorites-library/VLCLibraryFavoritesViewController.m
=====================================
@@ -302,6 +302,10 @@
selector:@selector(libraryModelUpdated:)
name:VLCLibraryModelFavoriteVideoMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelUpdated:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelUpdated:)
name:VLCLibraryModelFavoriteAudioMediaListReset
=====================================
modules/gui/macosx/library/home-library/VLCLibraryHomeViewController.m
=====================================
@@ -72,6 +72,7 @@
VLCLibraryModelAudioMediaListReset,
VLCLibraryModelVideoMediaItemDeleted,
VLCLibraryModelAudioMediaItemDeleted,
+ VLCLibraryModelAllCachesDropped,
};
for (size_t i = 0; i < ARRAY_SIZE(notificationNames); ++i) @autoreleasepool
=====================================
modules/gui/macosx/library/home-library/VLCLibraryHomeViewStackViewController.m
=====================================
@@ -64,7 +64,7 @@
- (void)dealloc
{
- self.collectionsStackView.subviews = @[];
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)setup
@@ -74,6 +74,14 @@
selector:@selector(recentsChanged:)
name:VLCLibraryModelRecentsMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(recentsChanged:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(recentsChanged:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(recentsChanged:)
name:VLCLibraryModelRecentsMediaItemDeleted
=====================================
modules/gui/macosx/library/home-library/VLCLibraryHomeViewVideoContainerViewDataSource.m
=====================================
@@ -152,6 +152,10 @@ NSString * const VLCLibraryVideoCollectionViewDataSourceDisplayedCollectionChang
selector:@selector(libraryModelVideoListReset:)
name:VLCLibraryModelVideoMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelVideoListReset:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelVideoItemUpdated:)
name:VLCLibraryModelVideoMediaItemUpdated
=====================================
modules/gui/macosx/library/video-library/VLCLibraryVideoDataSource.m
=====================================
@@ -165,6 +165,10 @@ NSString * const VLCLibraryVideoDataSourceDisplayedCollectionChangedNotification
selector:@selector(libraryModelVideoListReset:)
name:VLCLibraryModelVideoMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelVideoListReset:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelVideoItemUpdated:)
name:VLCLibraryModelVideoMediaItemUpdated
=====================================
modules/gui/macosx/library/video-library/VLCLibraryVideoViewController.m
=====================================
@@ -86,6 +86,10 @@
selector:@selector(libraryModelUpdated:)
name:VLCLibraryModelVideoMediaListReset
object:nil];
+ [notificationCenter addObserver:self
+ selector:@selector(libraryModelUpdated:)
+ name:VLCLibraryModelAllCachesDropped
+ object:nil];
[notificationCenter addObserver:self
selector:@selector(libraryModelUpdated:)
name:VLCLibraryModelVideoMediaItemDeleted
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/704dc69987edc3f166a24fdf963b1a4cba209467...159c9ccf80f264b8b1a813e17e5c397a988bb6a4
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/704dc69987edc3f166a24fdf963b1a4cba209467...159c9ccf80f264b8b1a813e17e5c397a988bb6a4
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list