Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
12aa343d by Claudio Cambra at 2022-11-28T06:12:58+00:00
macosx: Stop using magic numbers for audio library segments in 
VLCLibraryCollectionViewFlowLayout

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
=====================================
@@ -204,14 +204,14 @@ static CVReturn 
detailViewAnimationCallback(CVDisplayLinkRef displayLink,
 
         // Add detail view to the attributes set -- detail view about to be 
shown
         switch(audioDataSource.segmentedControl.selectedSegment) {
-            case 0:
-            case 3:
+            case VLCAudioLibraryArtistsSegment:
+            case VLCAudioLibraryGenresSegment:
                 [layoutAttributesArray addObject:[self 
layoutAttributesForSupplementaryViewOfKind:VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewKind
 atIndexPath:self.selectedIndexPath]];
                 break;
-            case 1:
+            case VLCAudioLibraryAlbumsSegment:
                 [layoutAttributesArray addObject:[self 
layoutAttributesForSupplementaryViewOfKind:VLCLibraryCollectionViewAlbumSupplementaryDetailViewKind
 atIndexPath:self.selectedIndexPath]];
                 break;
-            case 2:
+            case VLCAudioLibrarySongsSegment:
             default:
                 [layoutAttributesArray addObject:[self 
layoutAttributesForSupplementaryViewOfKind:VLCLibraryCollectionViewMediaItemSupplementaryDetailViewKind
 atIndexPath:self.selectedIndexPath]];
                 break;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/12aa343d301821952e1115c183aac89387385beb

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/12aa343d301821952e1115c183aac89387385beb
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to