Files
letro-ios/ElementX/Sources/Screens/MediaUploadPreviewScreen/MediaUploadPreviewScreenModels.swift
Stefan Ceriu 13bbc4b31f Show room encryption state in the composer (#3841)
* Fixes #3835 - Show room encryption state in the composer

* Update the preview test snapshots

* Update the UI test snapshots.
2025-02-27 22:16:26 +02:00

36 lines
870 B
Swift

//
// Copyright 2022-2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import Foundation
enum MediaUploadPreviewScreenViewModelAction {
case dismiss
}
struct MediaUploadPreviewScreenViewState: BindableState {
let url: URL
let title: String?
let shouldShowCaptionWarning: Bool
let isRoomEncrypted: Bool
var shouldDisableInteraction = false
var bindings = MediaUploadPreviewScreenBindings()
}
struct MediaUploadPreviewScreenBindings: BindableState {
var caption = NSAttributedString()
var presendCallback: (() -> Void)?
var selectedRange = NSRange(location: 0, length: 0)
var isPresentingMediaCaptionWarning = false
}
enum MediaUploadPreviewScreenViewAction {
case send
case cancel
}