2021-03-11 15:41:27 +08:00
|
|
|
//
|
|
|
|
// ComposeStatusSection.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by MainasuK Cirno on 2021-3-11.
|
|
|
|
//
|
|
|
|
|
2021-03-12 14:18:07 +08:00
|
|
|
import UIKit
|
|
|
|
import Combine
|
|
|
|
import CoreData
|
|
|
|
import CoreDataStack
|
2021-07-22 19:34:24 +08:00
|
|
|
import MetaTextKit
|
2021-06-28 19:41:41 +08:00
|
|
|
import MastodonMeta
|
2021-03-18 15:16:35 +08:00
|
|
|
import AlamofireImage
|
2021-03-11 15:41:27 +08:00
|
|
|
|
2022-10-10 19:14:52 +08:00
|
|
|
public enum ComposeStatusSection: Equatable, Hashable {
|
2022-01-27 21:23:39 +08:00
|
|
|
case replyTo
|
2021-03-11 15:41:27 +08:00
|
|
|
case status
|
2021-03-17 18:09:38 +08:00
|
|
|
case attachment
|
2021-03-23 18:47:21 +08:00
|
|
|
case poll
|
2021-03-11 15:41:27 +08:00
|
|
|
}
|
2021-03-12 14:18:07 +08:00
|
|
|
|
2022-10-10 19:14:52 +08:00
|
|
|
public protocol CustomEmojiReplaceableTextInput: UITextInput & UIResponder {
|
2021-03-25 15:56:17 +08:00
|
|
|
var inputView: UIView? { get set }
|
|
|
|
}
|
|
|
|
|
2022-10-10 19:14:52 +08:00
|
|
|
public class CustomEmojiReplaceableTextInputReference {
|
|
|
|
public weak var value: CustomEmojiReplaceableTextInput?
|
2021-03-25 15:56:17 +08:00
|
|
|
|
2022-10-10 19:14:52 +08:00
|
|
|
public init(value: CustomEmojiReplaceableTextInput? = nil) {
|
2021-03-25 15:56:17 +08:00
|
|
|
self.value = value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-18 14:25:32 +08:00
|
|
|
extension UITextField: CustomEmojiReplaceableTextInput { }
|
|
|
|
extension UITextView: CustomEmojiReplaceableTextInput { }
|