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

macosx: Add method in stack to get the relevant nav state for a given input node


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent 68c41afa
No related branches found
No related tags found
Loading
......@@ -26,6 +26,9 @@ NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryWindow;
@class VLCMediaSourceBaseDataSource;
@class VLCLibraryMediaSourceViewNavigationState;
typedef struct input_item_node_t input_item_node_t;
@interface VLCLibraryMediaSourceViewNavigationStack : NSObject
......@@ -39,6 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)appendCurrentLibraryState;
- (void)clear;
- (nullable VLCLibraryMediaSourceViewNavigationState *)stateForNode:(input_item_node_t *)node;
@end
......
......@@ -202,4 +202,12 @@
[self updateDelegateNavigationButtons];
}
- (nullable VLCLibraryMediaSourceViewNavigationState *)stateForNode:(input_item_node_t *)node
{
const NSUInteger index = [_navigationStates indexOfObjectPassingTest:^BOOL(VLCLibraryMediaSourceViewNavigationState * const _Nonnull obj, const NSUInteger idx, BOOL * const _Nonnull stop) {
return obj.currentNodeDisplayed.vlcInputItemNode == node;
}];
return index == NSNotFound ? nil : _navigationStates[index];
}
@end
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