From eaf1ddfb2e6e3c0d991beada5715215aaf7cb6c0 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 30 Mar 2022 16:17:06 +0100 Subject: [PATCH 1/3] Fix crash when using the build in camera. --- Riot/Modules/Room/RoomViewController.m | 5 +++-- changelog.d/5951.bugfix | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog.d/5951.bugfix diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 3aa1b86405..07eaea8cac 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -7154,7 +7154,7 @@ - (void)cameraPresenterDidCancel:(CameraPresenter *)cameraPresenter self.cameraPresenter = nil; } -- (void)cameraPresenter:(CameraPresenter *)cameraPresenter didSelectImageData:(NSData *)imageData withUTI:(MXKUTI *)uti +- (void)cameraPresenter:(CameraPresenter *)cameraPresenter didSelectImage:(UIImage *)image { [cameraPresenter dismissWithAnimated:YES completion:nil]; self.cameraPresenter = nil; @@ -7162,8 +7162,9 @@ - (void)cameraPresenter:(CameraPresenter *)cameraPresenter didSelectImageData:(N RoomInputToolbarView *roomInputToolbarView = [self inputToolbarViewAsRoomInputToolbarView]; if (roomInputToolbarView) { + NSData *imageData = UIImageJPEGRepresentation(image, 1.0); [roomInputToolbarView sendSelectedImage:imageData - withMimeType:uti.mimeType + withMimeType:MXKUTI.jpeg.mimeType andCompressionMode:MediaCompressionHelper.defaultCompressionMode isPhotoLibraryAsset:NO]; } diff --git a/changelog.d/5951.bugfix b/changelog.d/5951.bugfix new file mode 100644 index 0000000000..d5c0ef8389 --- /dev/null +++ b/changelog.d/5951.bugfix @@ -0,0 +1 @@ +Message Composer: Fix a crash when sending a photo using the camera. \ No newline at end of file From cfbfd6f5c3e5e0d6afee3342929efb682ce0e4d2 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 31 Mar 2022 09:35:53 +0100 Subject: [PATCH 2/3] version++ --- CHANGES.md | 7 +++++++ Config/AppVersion.xcconfig | 4 ++-- changelog.d/5951.bugfix | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 changelog.d/5951.bugfix diff --git a/CHANGES.md b/CHANGES.md index 14527a6231..f3e7f38903 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +## Changes in 1.8.10 (2022-03-31) + +🐛 Bugfixes + +- Message Composer: Fix a crash when sending a photo using the camera. ([#5951](https://github.com/vector-im/element-ios/issues/5951)) + + ## Changes in 1.8.9 (2022-03-28) 🙌 Improvements diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 5eee7402cc..cae75da833 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.8.9 -CURRENT_PROJECT_VERSION = 1.8.9 +MARKETING_VERSION = 1.8.10 +CURRENT_PROJECT_VERSION = 1.8.10 diff --git a/changelog.d/5951.bugfix b/changelog.d/5951.bugfix deleted file mode 100644 index d5c0ef8389..0000000000 --- a/changelog.d/5951.bugfix +++ /dev/null @@ -1 +0,0 @@ -Message Composer: Fix a crash when sending a photo using the camera. \ No newline at end of file From 8524fdfda4d2e7d8e43089a8baaeffff18a17f70 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 31 Mar 2022 10:39:21 +0100 Subject: [PATCH 3/3] finish version++ --- Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 6aa1b9143f..761bfd2adc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -227,4 +227,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 820f04e07aa252459ecfa88d04da729daca4fcbb -COCOAPODS: 1.11.3 +COCOAPODS: 1.11.2