[vlc-commits] [Git][videolan/vlc][master] macosx: Stop using magic numbers for audio library segments in VLCLibraryCollectionViewFlowLayout

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Nov 28 06:24:55 UTC 2022



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 <developer at claudiocambra.com>

- - - - -


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


More information about the vlc-commits mailing list