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

macosx: Remove unnecessary ifs in scroll to view


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent a4d39f9c
No related branches found
No related tags found
1 merge request!6455macosx: Scroll collectionview parent scroll view when supplementary detail view goes beyond bounds
......@@ -188,11 +188,9 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
if (!newItemOnSameRow) {
[self animateDetailViewWithAnimation:VLCDetailViewAnimationTypeExpand];
if (indexPath != nil && self.collectionView != nil) {
NSRect frame = [self.collectionView layoutAttributesForItemAtIndexPath:indexPath].frame;
frame.size.height += [self finalExpandedHeight];
[self.collectionView.animator scrollRectToVisible:frame];
}
NSRect frame = [self.collectionView layoutAttributesForItemAtIndexPath:indexPath].frame;
frame.size.height += [self finalExpandedHeight];
[self.collectionView.animator scrollRectToVisible:frame];
} else {
_animationIsCollapse = NO;
}
......
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