mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add media upload preview cropping capability for images (#5575)
Start using [Mantis](https://github.com/guoyingtao/Mantis) to crop and rotate images before upload.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
enum MediaUploadPreviewScreenViewModelAction {
|
||||
case dismiss
|
||||
@@ -19,6 +20,8 @@ struct MediaUploadPreviewScreenViewState: BindableState {
|
||||
let isRoomEncrypted: Bool
|
||||
var shouldDisableInteraction = false
|
||||
|
||||
var mediaEditVersion = 0
|
||||
|
||||
var bindings = MediaUploadPreviewScreenBindings()
|
||||
}
|
||||
|
||||
@@ -28,6 +31,7 @@ struct MediaUploadPreviewScreenBindings: BindableState {
|
||||
var selectedRange = NSRange(location: 0, length: 0)
|
||||
|
||||
var isPresentingMediaCaptionWarning = false
|
||||
var isPresentingMediaEditor = false
|
||||
var alertInfo: AlertInfo<MediaUploadPreviewAlertType>?
|
||||
}
|
||||
|
||||
@@ -39,4 +43,5 @@ enum MediaUploadPreviewAlertType: Hashable {
|
||||
enum MediaUploadPreviewScreenViewAction {
|
||||
case send
|
||||
case cancel
|
||||
case editedMedia(image: UIImage, index: Int)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user