2023-04-16 17:23:13 +00:00
|
|
|
//
|
|
|
|
// ComposeUIConfig.swift
|
|
|
|
// ComposeUI
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 3/4/23.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import Pachyderm
|
|
|
|
import PhotosUI
|
|
|
|
import PencilKit
|
2023-04-16 17:47:06 +00:00
|
|
|
import TuskerComponents
|
2023-04-16 17:23:13 +00:00
|
|
|
|
|
|
|
public struct ComposeUIConfig {
|
2023-04-19 01:55:14 +00:00
|
|
|
// Config
|
|
|
|
public var allowSwitchingDrafts = true
|
|
|
|
public var textSelectionStartsAtBeginning = false
|
|
|
|
|
|
|
|
// Style
|
2023-04-16 17:23:13 +00:00
|
|
|
public var backgroundColor = Color(uiColor: .systemBackground)
|
|
|
|
public var groupedBackgroundColor = Color(uiColor: .systemGroupedBackground)
|
|
|
|
public var groupedCellBackgroundColor = Color(uiColor: .systemBackground)
|
|
|
|
public var fillColor = Color(uiColor: .systemFill)
|
2023-04-16 17:47:06 +00:00
|
|
|
public var avatarStyle = AvatarImageView.Style.roundRect
|
2023-04-19 01:55:14 +00:00
|
|
|
|
|
|
|
// Preferences
|
2023-04-16 17:23:13 +00:00
|
|
|
public var useTwitterKeyboard = false
|
|
|
|
public var contentType = StatusContentType.plain
|
|
|
|
public var requireAttachmentDescriptions = false
|
|
|
|
|
2023-04-19 01:55:14 +00:00
|
|
|
// Host callbacks
|
2023-04-16 17:23:13 +00:00
|
|
|
public var dismiss: @MainActor (DismissMode) -> Void = { _ in }
|
|
|
|
public var presentAssetPicker: ((@MainActor @escaping ([PHPickerResult]) -> Void) -> Void)?
|
|
|
|
public var presentDrawing: ((PKDrawing, @escaping (PKDrawing) -> Void) -> Void)?
|
|
|
|
public var userActivityForDraft: ((Draft) -> NSItemProvider?) = { _ in nil }
|
|
|
|
|
|
|
|
public init() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension ComposeUIConfig {
|
|
|
|
}
|