Skip to content

Commit

Permalink
Merge branch 'release/1.11.8/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Mar 5, 2024
2 parents 6a9bcc8 + d83409c commit ee6e5de
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 82 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.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
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.7
CURRENT_PROJECT_VERSION = 1.11.7
MARKETING_VERSION = 1.11.8
CURRENT_PROJECT_VERSION = 1.11.8
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9599,15 +9599,15 @@ 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")
}
/// Decrease indentation
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")
}
Expand Down
8 changes: 1 addition & 7 deletions Riot/Modules/Common/Recents/Views/RecentTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
51 changes: 2 additions & 49 deletions Riot/Modules/QRCode/Reader/QRCodeReaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ final class QRCodeReaderView: UIView {
}

private func applyOrientation() {

let orientation = UIApplication.shared.statusBarOrientation
let captureRotation: Double
let scanRectRotation: Double
Expand All @@ -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
}
}


Expand Down
18 changes: 8 additions & 10 deletions RiotSwiftUI/Modules/Room/Composer/View/Composer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct Composer: View {
placeholder: viewModel.viewState.placeholder ?? "",
viewModel: wysiwygViewModel,
itemProviderHelper: nil,
keyCommandHandler: handleKeyCommand,
keyCommands: keyCommands,
pasteHandler: nil
)
.clipped()
Expand Down Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee6e5de

Please sign in to comment.