Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f9490212 by Claudio Cambra at 2024-02-12T07:39:16+00:00
macosx: Do not use magic number for initial audio library segment

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -
cb58ece0 by Claudio Cambra at 2024-02-12T07:39:16+00:00
macosx: Fix early returns for audio media item related notification handlers in 
audio data source

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m


Changes:

=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
=====================================
@@ -209,8 +209,9 @@ NSString * const 
VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
 
 - (void)libraryModelAudioMediaItemsReset:(NSNotification * const)aNotification
 {
+    NSLog(@"Pre aa currentParentType %i %i %i", self.currentParentType, 
VLCMediaLibraryParentGroupTypeAudioLibrary, 
VLCMediaLibraryParentGroupTypeRecentAudios);
     if (self.currentParentType != VLCMediaLibraryParentGroupTypeAudioLibrary
-        || self.currentParentType != 
VLCMediaLibraryParentGroupTypeRecentAudios) {
+        && self.currentParentType != 
VLCMediaLibraryParentGroupTypeRecentAudios) {
         return;
     }
 
@@ -260,7 +261,7 @@ NSString * const 
VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
 - (void)libraryModelAudioMediaItemUpdated:(NSNotification * const)aNotification
 {
     if (self.currentParentType != VLCMediaLibraryParentGroupTypeAudioLibrary
-        || self.currentParentType != 
VLCMediaLibraryParentGroupTypeRecentAudios) {
+        && self.currentParentType != 
VLCMediaLibraryParentGroupTypeRecentAudios) {
         return;
     }
 
@@ -310,7 +311,7 @@ NSString * const 
VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
 - (void)libraryModelAudioMediaItemDeleted:(NSNotification * const)aNotification
 {
     if (self.currentParentType != VLCMediaLibraryParentGroupTypeAudioLibrary
-        || self.currentParentType != 
VLCMediaLibraryParentGroupTypeRecentAudios) {
+        && self.currentParentType != 
VLCMediaLibraryParentGroupTypeRecentAudios) {
         return;
     }
 
@@ -366,8 +367,8 @@ NSString * const 
VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
 {
     [VLCLibraryAudioDataSource setupCollectionView:self.collectionView];
     [self setupTableViews];
-
-    _audioLibrarySegment = -1; // Force setAudioLibrarySegment to do something 
always on first try
+    // Force setAudioLibrarySegment to do something always on first try
+    _audioLibrarySegment = VLCAudioLibraryUnknownSegment;
 }
 
 + (void)setupCollectionView:(NSCollectionView *)collectionView



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/ddc594a59f4577112b4929deb93f6ee01a95d606...cb58ece06c2f734e3691dfda4aa85833874d0d84

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/ddc594a59f4577112b4929deb93f6ee01a95d606...cb58ece06c2f734e3691dfda4aa85833874d0d84
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to