conversations-classic-ios/ConversationsClassic/AppCore/State/SharingState.swift
2024-07-16 13:56:06 +02:00

33 lines
629 B
Swift

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?
}
struct SharingState: Stateable {
var sharingShown: Bool
var isCameraAccessGranted: Bool
var isGalleryAccessGranted: Bool
var galleryItems: [SharingGalleryItem]
}
// MARK: Init
extension SharingState {
init() {
sharingShown = false
isCameraAccessGranted = false
isGalleryAccessGranted = false
galleryItems = []
}
}