Skip to content

Commit

Permalink
Merge pull request #1055 from tchapgouv/rebase/element-ios-1.11.12
Browse files Browse the repository at this point in the history
Rebase/element ios 1.11.12
  • Loading branch information
NicolasBuquet authored Jun 6, 2024
2 parents e8ec0a4 + 263e713 commit cffe063
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 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.


## Changes in 1.11.10 (2024-05-01)

🙌 Improvements
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use_frameworks!
# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI
#
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
$matrixSDKVersion = '= 0.27.7'
$matrixSDKVersion = '= 0.27.8'
# $matrixSDKVersion = :local
# $matrixSDKVersion = { :branch => 'develop'}
# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } }
Expand Down
8 changes: 4 additions & 4 deletions Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
}
},
{
"identity" : "matrix-wysiwyg-composer-swift",
"identity" : "matrix-rich-text-editor-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
"location" : "https://github.com/matrix-org/matrix-rich-text-editor-swift",
"state" : {
"revision" : "f788fe2482c0b89019f679a1f43dccf9c25a0782",
"version" : "2.29.0"
"revision" : "21c0dd6e9c0b38d19d97af8e3e99fe01df56825d",
"version" : "2.37.3"
}
},
{
Expand Down
2 changes: 2 additions & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2605,6 +2605,8 @@ To enable access, tap Settings> Location and select Always"; // Tchap


// MARK: - WYSIWYG Composer
"wysiwyg_composer_action_minimise_action" = "Shrink composer";
"wysiwyg_composer_action_maximise_action" = "Expand composer";

// Send Media Actions
"wysiwyg_composer_start_action_media_picker" = "Photo Library";
Expand Down
8 changes: 8 additions & 0 deletions Riot/Generated/Vector_Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9575,6 +9575,14 @@ public class VectorL10n: NSObject {
public static var widgetStickerPickerNoStickerpacksAlertAddNow: String {
return VectorL10n.tr("Vector", "widget_sticker_picker_no_stickerpacks_alert_add_now")
}
/// Expand composer
public static var wysiwygComposerActionMaximiseAction: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_action_maximise_action")
}
/// Shrink composer
public static var wysiwygComposerActionMinimiseAction: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_action_minimise_action")
}
/// Apply bold format
public static var wysiwygComposerFormatActionBold: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_bold")
Expand Down
4 changes: 4 additions & 0 deletions Riot/Modules/Rendezvous/RendezvousService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ enum RendezvousFlow: String {
case SETUP_ADDITIONAL_DEVICE_V2 = "org.matrix.msc3906.setup.additional_device.v2"
}

// n.b MSC3886/MSC3903/MSC3906 that this is based on are now closed.
// However, we want to keep this implementation around for some time.
// TODO: define an end-of-life date for this implementation.

/// Allows communication through a secure channel. Based on MSC3886 and MSC3903
@MainActor
class RendezvousService {
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import ZXingObjC

// MARK: - QRLoginService

// n.b MSC3886/MSC3903/MSC3906 that this is based on are now closed.
// However, we want to keep this implementation around for some time.
// TODO: define an end-of-life date for this implementation.
class QRLoginService: NSObject, QRLoginServiceProtocol {
private let client: AuthenticationRestClient
private let sessionCreator: SessionCreatorProtocol
Expand Down
5 changes: 5 additions & 0 deletions RiotSwiftUI/Modules/Room/Composer/View/Composer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ struct Composer: View {
wysiwygViewModel.maximised ? "minimiseButton" : "maximiseButton"
}

private var toggleButtonAccessibilityLabel: String {
wysiwygViewModel.maximised ? VectorL10n.wysiwygComposerActionMinimiseAction : VectorL10n.wysiwygComposerActionMaximiseAction
}

private var toggleButtonImageName: String {
wysiwygViewModel.maximised ? Asset.Images.minimiseComposer.name : Asset.Images.maximiseComposer.name
}
Expand Down Expand Up @@ -171,6 +175,7 @@ struct Composer: View {
.frame(width: 16, height: 16)
}
.accessibilityIdentifier(toggleButtonAcccessibilityIdentifier)
.accessibilityLabel(toggleButtonAccessibilityLabel)
.padding(.leading, 12)
.padding(.trailing, 4)
}
Expand Down
3 changes: 3 additions & 0 deletions RiotTests/FakeUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ class FakeCrypto: NSObject, MXCrypto {

}

func invalidateCache(_ done: @escaping () -> Void) {

}
}


Expand Down
4 changes: 2 additions & 2 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ packages:
url: https://github.com/element-hq/swift-ogg
branch: 0.0.1
WysiwygComposer:
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift
version: 2.29.0
url: https://github.com/matrix-org/matrix-rich-text-editor-swift
version: 2.37.3
DeviceKit:
url: https://github.com/devicekit/DeviceKit
majorVersion: 4.7.0
Expand Down

0 comments on commit cffe063

Please sign in to comment.