2023-04-16 17:23:13 +00:00
|
|
|
//
|
|
|
|
// ComposeMastodonContext.swift
|
|
|
|
// ComposeUI
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 3/5/23.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import Pachyderm
|
|
|
|
import InstanceFeatures
|
|
|
|
import UserAccounts
|
|
|
|
|
|
|
|
public protocol ComposeMastodonContext {
|
|
|
|
var accountInfo: UserAccountInfo? { get }
|
|
|
|
var instanceFeatures: InstanceFeatures { get }
|
|
|
|
|
|
|
|
func run<Result: Sendable>(_ request: Request<Result>) async throws -> (Result, Pagination?)
|
2024-01-27 19:58:36 +00:00
|
|
|
|
|
|
|
func getCustomEmojis() async -> [Emoji]
|
2023-04-16 17:23:13 +00:00
|
|
|
|
|
|
|
@MainActor
|
|
|
|
func searchCachedAccounts(query: String) -> [AccountProtocol]
|
|
|
|
@MainActor
|
|
|
|
func cachedRelationship(for accountID: String) -> RelationshipProtocol?
|
|
|
|
@MainActor
|
|
|
|
func searchCachedHashtags(query: String) -> [Hashtag]
|
2023-05-11 13:59:57 +00:00
|
|
|
|
|
|
|
func storeCreatedStatus(_ status: Status)
|
2023-04-16 17:23:13 +00:00
|
|
|
}
|