Skip to content

Commit

Permalink
Merge branch 'release/1.11.12/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed May 30, 2024
2 parents da3c187 + c5cbcab commit 1c51cde
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Changes in 1.11.12 (2024-05-30)

🐛 Bugfixes

- Fix a crash when the user taps play multiple times and the video download fails. ([#7791](https://github.com/element-hq/element-ios/issues/7791))


## Changes in 1.11.11 (2024-05-29)

No significant changes.
Expand Down
4 changes: 2 additions & 2 deletions Config/AppVersion.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
//

// Version
MARKETING_VERSION = 1.11.11
CURRENT_PROJECT_VERSION = 1.11.11
MARKETING_VERSION = 1.11.12
CURRENT_PROJECT_VERSION = 1.11.12
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ The attachments array (MXAttachment instances).

@property (nonatomic) BOOL customAnimationsEnabled;

@property (nonatomic) BOOL isLoadingVideo;

@end

@implementation MXKAttachmentsViewController
Expand Down Expand Up @@ -969,8 +971,10 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
navigationBarDisplayTimer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(hideNavigationBar) userInfo:self repeats:NO];
}
}
else
else if (!self.isLoadingVideo)
{
self.isLoadingVideo = YES;

MXKPieChartView *pieChartView = [[MXKPieChartView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
pieChartView.progress = 0;
pieChartView.progressColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.25];
Expand Down Expand Up @@ -1020,6 +1024,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
[selectedCell.moviePlayer.player play];

[pieChartView removeFromSuperview];
self.isLoadingVideo = NO;

[self hideNavigationBar];
}
Expand All @@ -1035,6 +1040,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
MXLogDebug(@"[MXKAttachmentsVC] video download failed");

[pieChartView removeFromSuperview];
self.isLoadingVideo = NO;

// Display the navigation bar so that the user can leave this screen
self.navigationBarContainer.hidden = NO;
Expand Down

0 comments on commit 1c51cde

Please sign in to comment.