Skip to content
Snippets Groups Projects
Commit 07dab83c authored by Claudio Cambra's avatar Claudio Cambra Committed by Steve Lhomme
Browse files

macosx: Use new methods to present views in groups view controller including no results


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent e7558569
No related branches found
No related tags found
1 merge request!6136macosx: Unify handling of various view's presentation
Pipeline #521511 passed with stage
in 16 minutes and 44 seconds
......@@ -237,22 +237,20 @@
- (void)presentGroupsView
{
if (self.dataSource.libraryModel.numberOfGroups == 0) {
[self presentPlaceholderGroupsView];
return;
}
const VLCLibraryViewModeSegment viewModeSegment =
VLCLibraryWindowPersistentPreferences.sharedInstance.groupsLibraryViewMode;
NSView *viewToPresent = nil;
if (viewModeSegment == VLCLibraryGridViewModeSegment) {
viewToPresent = self.collectionViewScrollView;
if (self.dataSource.libraryModel.numberOfGroups > 0) {
if (viewModeSegment == VLCLibraryGridViewModeSegment) {
[self.libraryWindow displayLibraryView:self.collectionViewScrollView];
} else {
[self.libraryWindow displayLibraryView:self.listViewSplitView];
}
} else if (self.dataSource.libraryModel.filterString.length > 0) {
[self.libraryWindow displayNoResultsMessage];
} else {
viewToPresent = self.listViewSplitView;
[self presentPlaceholderGroupsView];
}
NSParameterAssert(viewToPresent != nil);
[self.libraryWindow displayLibraryView:viewToPresent];
}
- (void)presentGroup:(VLCMediaLibraryGroup *)group
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment