conversations-classic-ios/ConversationsClassic/AppCore/State/SharingState.swift

33 lines
629 B
Swift
Raw Normal View History

2024-07-10 17:49:36 +00:00
import Foundation
enum SharingCameraMediaType: Stateable {
case video
case photo
}
struct SharingGalleryItem: Stateable, Identifiable {
var id: String
var type: SharingCameraMediaType
var thumbnail: Data?
var duration: String?
}
2024-07-10 14:13:47 +00:00
struct SharingState: Stateable {
var sharingShown: Bool
2024-07-10 17:49:36 +00:00
var isCameraAccessGranted: Bool
var isGalleryAccessGranted: Bool
var galleryItems: [SharingGalleryItem]
2024-07-10 14:13:47 +00:00
}
// MARK: Init
extension SharingState {
init() {
sharingShown = false
2024-07-10 17:49:36 +00:00
isCameraAccessGranted = false
isGalleryAccessGranted = false
galleryItems = []
2024-07-10 14:13:47 +00:00
}
}