Browse Source

macosx: Remove unnecessary ifs in scroll to view

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
pull/175/head
Claudio Cambra 1 year ago
committed by Steve Lhomme
parent
commit
8752d37dd4
  1. 8
      modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m

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

@ -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;
}

Loading…
Cancel
Save