diff --git a/CHANGES.md b/CHANGES.md index f6dc2d35a7..174be9ac8a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,15 @@ +## Changes in 1.11.8 (2024-03-05) + +🙌 Improvements + +- Disable the mark as unread feature to avoid it clashing with the new MSC2876 based one ([#7758](https://github.com/element-hq/element-ios/pull/7758)) + +🐛 Bugfixes + +- Fix a bug where QR codes aren't detected if the camera is too close. ([#7762](https://github.com/element-hq/element-ios/pull/7762)) +- Fix dictation when using the Rich Text Editor ([#7752](https://github.com/element-hq/element-ios/issues/7752)) + + ## Changes in 1.11.7 (2024-02-07) 🙌 Improvements diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index b0122b592b..b1d7c33ed5 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.11.7 -CURRENT_PROJECT_VERSION = 1.11.7 +MARKETING_VERSION = 1.11.8 +CURRENT_PROJECT_VERSION = 1.11.8 diff --git a/Podfile b/Podfile index f158719fd9..9ad4fefa28 100644 --- a/Podfile +++ b/Podfile @@ -59,7 +59,7 @@ end def import_SwiftUI_pods pod 'Introspect', '~> 0.1' pod 'DSBottomSheet', '~> 0.3' - pod 'ZXingObjC', '~> 3.6.5' + pod 'ZXingObjC', '~> 3.6.9' end abstract_target 'RiotPods' do diff --git a/Podfile.lock b/Podfile.lock index f1159231eb..abe637e538 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -87,9 +87,9 @@ PODS: - UICollectionViewRightAlignedLayout (0.0.3) - WeakDictionary (2.0.2) - zxcvbn-ios (1.0.4) - - ZXingObjC (3.6.5): - - ZXingObjC/All (= 3.6.5) - - ZXingObjC/All (3.6.5) + - ZXingObjC (3.6.9): + - ZXingObjC/All (= 3.6.9) + - ZXingObjC/All (3.6.9) DEPENDENCIES: - Down (~> 0.11.0) @@ -119,7 +119,7 @@ DEPENDENCIES: - UICollectionViewRightAlignedLayout (~> 0.0.3) - WeakDictionary (~> 2.0) - zxcvbn-ios - - ZXingObjC (~> 3.6.5) + - ZXingObjC (~> 3.6.9) SPEC REPOS: trunk: @@ -206,8 +206,8 @@ SPEC CHECKSUMS: UICollectionViewRightAlignedLayout: 823eef8c567eba4a44c21bc2ffcb0d0d5f361e2d WeakDictionary: 8cd038acd77e5d54ca4ebaec3d20853d732b45e0 zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c - ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb + ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 -PODFILE CHECKSUM: 9245f34ec35d24a0993d1a16faa145cf3094a1b2 +PODFILE CHECKSUM: c87b532985dd755b373732f841e3bcfe616f4e4f COCOAPODS: 1.14.3 diff --git a/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved index 47f1e5fe62..2f19e2ddc5 100644 --- a/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift", "state" : { - "revision" : "0aa1308c43451fd077e332f72d6a32135f258834", - "version" : "2.19.0" + "revision" : "f788fe2482c0b89019f679a1f43dccf9c25a0782", + "version" : "2.29.0" } }, { diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index aa3ca9d725..f5cc6ae5be 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -9599,7 +9599,7 @@ public class VectorL10n: NSObject { public static var wysiwygComposerFormatActionQuote: String { return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_quote") } - /// Apply underline format + /// Apply strikethrough format public static var wysiwygComposerFormatActionStrikethrough: String { return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_strikethrough") } @@ -9607,7 +9607,7 @@ public class VectorL10n: NSObject { public static var wysiwygComposerFormatActionUnIndent: String { return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_un_indent") } - /// Apply strikethrough format + /// Apply underline format public static var wysiwygComposerFormatActionUnderline: String { return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_underline") } diff --git a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m index afd3f5c880..9df1210109 100644 --- a/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m +++ b/Riot/Modules/Common/Recents/Views/RecentTableViewCell.m @@ -93,13 +93,7 @@ - (void)render:(MXKCellData *)cellData self.lastEventDecriptionLabelTrailingConstraint.constant = self.unsentImageView.hidden ? 10 : 30; // Notify unreads and bing - if (roomCellData.isRoomMarkedAsUnread) - { - self.missedNotifAndUnreadBadgeBgView.hidden = NO; - self.missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.tintColor; - self.missedNotifAndUnreadBadgeBgViewWidthConstraint.constant = 20; - } - else if (roomCellData.hasUnread) + if (roomCellData.hasUnread) { self.missedNotifAndUnreadIndicator.hidden = NO; if (0 < roomCellData.notificationCount) diff --git a/Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift b/Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift index c019aae9c0..d9cde9dbe6 100644 --- a/Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift +++ b/Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift @@ -34,7 +34,7 @@ class RoomActionProvider: RoomActionProviderProtocol { var menu: UIMenu { if service.isRoomJoined { - var children = service.hasUnread ? [self.markAsReadAction] : [self.markAsUnreadAction] + var children = service.hasUnread ? [self.markAsReadAction] : [] children.append(contentsOf: [ self.directChatAction, self.notificationsAction, diff --git a/Riot/Modules/ContextMenu/Services/RoomContextActionService.swift b/Riot/Modules/ContextMenu/Services/RoomContextActionService.swift index 12c02c9381..eb49328250 100644 --- a/Riot/Modules/ContextMenu/Services/RoomContextActionService.swift +++ b/Riot/Modules/ContextMenu/Services/RoomContextActionService.swift @@ -38,7 +38,7 @@ class RoomContextActionService: NSObject, RoomContextActionServiceProtocol { self.room = room self.delegate = delegate self.isRoomJoined = room.summary?.isJoined ?? false - self.hasUnread = (room.summary?.hasAnyUnread ?? false) || room.isMarkedAsUnread + self.hasUnread = room.summary?.hasAnyUnread ?? false self.roomMembership = room.summary?.membership ?? .unknown self.session = room.mxSession self.unownedRoomService = UnownedRoomContextActionService(roomId: room.roomId, canonicalAlias: room.summary?.aliases?.first, session: self.session, delegate: delegate) diff --git a/Riot/Modules/QRCode/Reader/QRCodeReaderView.swift b/Riot/Modules/QRCode/Reader/QRCodeReaderView.swift index 21f1b8497c..302cd63104 100644 --- a/Riot/Modules/QRCode/Reader/QRCodeReaderView.swift +++ b/Riot/Modules/QRCode/Reader/QRCodeReaderView.swift @@ -113,7 +113,6 @@ final class QRCodeReaderView: UIView { } private func applyOrientation() { - let orientation = UIApplication.shared.statusBarOrientation let captureRotation: Double let scanRectRotation: Double @@ -136,59 +135,13 @@ final class QRCodeReaderView: UIView { scanRectRotation = 90 } - applyRectOfInterest(orientation: orientation) - let angleRadius = captureRotation / 180.0 * Double.pi - let captureTranform = CGAffineTransform(rotationAngle: CGFloat(angleRadius)) + let captureTransform = CGAffineTransform(rotationAngle: CGFloat(angleRadius)) - zxCapture.transform = captureTranform + zxCapture.transform = captureTransform zxCapture.rotation = CGFloat(scanRectRotation) zxCapture.layer.frame = self.bounds } - - private func applyRectOfInterest(orientation: UIInterfaceOrientation) { - var transformedVideoRect = self.frame - let cameraSessionPreset = zxCapture.sessionPreset - - var scaleVideoX, scaleVideoY: CGFloat - var videoHeight, videoWidth: CGFloat - - // Currently support only for 1920x1080 || 1280x720 - if cameraSessionPreset == AVCaptureSession.Preset.hd1920x1080.rawValue { - videoHeight = 1080.0 - videoWidth = 1920.0 - } else { - videoHeight = 720.0 - videoWidth = 1280.0 - } - - if orientation == UIInterfaceOrientation.portrait { - scaleVideoX = self.frame.width / videoHeight - scaleVideoY = self.frame.height / videoWidth - - // Convert CGPoint under portrait mode to map with orientation of image - // because the image will be cropped before rotate - // reference: https://github.com/TheLevelUp/ZXingObjC/issues/222 - let realX = transformedVideoRect.origin.y - let realY = self.frame.size.width - transformedVideoRect.size.width - transformedVideoRect.origin.x - let realWidth = transformedVideoRect.size.height - let realHeight = transformedVideoRect.size.width - transformedVideoRect = CGRect(x: realX, y: realY, width: realWidth, height: realHeight) - - } else { - scaleVideoX = self.frame.width / videoWidth - scaleVideoY = self.frame.height / videoHeight - } - - captureSizeTransform = CGAffineTransform(scaleX: 1.0/scaleVideoX, y: 1.0/scaleVideoY) - - guard let _captureSizeTransform = captureSizeTransform else { - return - } - - let transformRect = transformedVideoRect.applying(_captureSizeTransform) - zxCapture.scanRect = transformRect - } } diff --git a/RiotSwiftUI/Modules/Room/Composer/View/Composer.swift b/RiotSwiftUI/Modules/Room/Composer/View/Composer.swift index f2a60ce066..5850980920 100644 --- a/RiotSwiftUI/Modules/Room/Composer/View/Composer.swift +++ b/RiotSwiftUI/Modules/Room/Composer/View/Composer.swift @@ -137,7 +137,7 @@ struct Composer: View { placeholder: viewModel.viewState.placeholder ?? "", viewModel: wysiwygViewModel, itemProviderHelper: nil, - keyCommandHandler: handleKeyCommand, + keyCommands: keyCommands, pasteHandler: nil ) .clipped() @@ -228,15 +228,13 @@ struct Composer: View { } } - func handleKeyCommand(_ keyCommand: WysiwygKeyCommand) -> Bool { - switch keyCommand { - case .enter: - sendMessageAction(wysiwygViewModel.content) - wysiwygViewModel.clearContent() - return true - case .shiftEnter: - return false - } + var keyCommands: [WysiwygKeyCommand] { + [ + .enter { + sendMessageAction(wysiwygViewModel.content) + wysiwygViewModel.clearContent() + } + ] } /// Computes the total height of the composer (excluding the RTE formatting bar). diff --git a/project.yml b/project.yml index 55f31044e6..3d410864a3 100644 --- a/project.yml +++ b/project.yml @@ -59,7 +59,7 @@ packages: branch: 0.0.1 WysiwygComposer: url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift - version: 2.19.0 + version: 2.29.0 DeviceKit: url: https://github.com/devicekit/DeviceKit majorVersion: 4.7.0