forked from shadowfacts/Tusker
30 lines
767 B
Swift
30 lines
767 B
Swift
//
|
|
// 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?)
|
|
|
|
func getCustomEmojis() async -> [Emoji]
|
|
|
|
@MainActor
|
|
func searchCachedAccounts(query: String) -> [AccountProtocol]
|
|
@MainActor
|
|
func cachedRelationship(for accountID: String) -> RelationshipProtocol?
|
|
@MainActor
|
|
func searchCachedHashtags(query: String) -> [Hashtag]
|
|
|
|
func storeCreatedStatus(_ status: Status)
|
|
}
|