From 0edb6284a5d38e9d7d879bd0613b9e9eee0765e0 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sat, 13 Dec 2025 04:19:37 -0800 Subject: [PATCH] macosx: Avoid creating unneeded copies of generated animation steps in flow layout Signed-off-by: Claudio Cambra --- .../library/VLCLibraryCollectionViewFlowLayout.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m b/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m index aeeba4ba0f..6da013fac2 100644 --- a/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m +++ b/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m @@ -99,10 +99,10 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink, { self = [super init]; if (self) { - _mediumHeightAnimationSteps = [NSArray arrayWithArray:[self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.mediumDetailSupplementaryViewCollectionViewHeight]]; - _largeHeightAnimationSteps = [NSArray arrayWithArray:[self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.largeDetailSupplementaryViewCollectionViewHeight]]; - _mediumWidthAnimationSteps = [NSArray arrayWithArray:[self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.mediumDetailSupplementaryViewCollectionViewWidth]]; - _largeWidthAnimationSteps = [NSArray arrayWithArray:[self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.largeDetailSupplementaryViewCollectionViewWidth]]; + _mediumHeightAnimationSteps = [self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.mediumDetailSupplementaryViewCollectionViewHeight]; + _largeHeightAnimationSteps = [self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.largeDetailSupplementaryViewCollectionViewHeight]; + _mediumWidthAnimationSteps = [self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.mediumDetailSupplementaryViewCollectionViewWidth]; + _largeWidthAnimationSteps = [self generateAnimationStepsForExpandedViewDimension:VLCLibraryUIUnits.largeDetailSupplementaryViewCollectionViewWidth]; _animationType = VLCExpandAnimationTypeVerticalMedium; _prevProvidedAnimationStep = 0; @@ -126,7 +126,7 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink, generatedAnimationSteps[i] = @(dimension * (progress * progress * progress + 1) + kDetailViewCollapsedHeight); } - return [generatedAnimationSteps copy]; + return generatedAnimationSteps; } - (CGFloat)currentAnimationStep