Files
letro-ios/ElementX/Sources/Services/Timeline/RoomTimelineControllerProtocol.swift
Doug a272980b62 Add SwiftFormat to the project. (#129)
* Run swiftformat for whitespace.
* Run swiftformat with some rules.
2022-07-06 14:49:05 +01:00

34 lines
843 B
Swift

//
// RoomTimelineControllerProtocol.swift
// ElementX
//
// Created by Stefan Ceriu on 04.03.2022.
// Copyright © 2022 Element. All rights reserved.
//
import Combine
import Foundation
enum RoomTimelineControllerCallback {
case updatedTimelineItems
case updatedTimelineItem(_ itemId: String)
}
enum RoomTimelineControllerError: Error {
case generic
}
@MainActor
protocol RoomTimelineControllerProtocol {
var timelineItems: [RoomTimelineItemProtocol] { get }
var callbacks: PassthroughSubject<RoomTimelineControllerCallback, Never> { get }
func processItemAppearance(_ itemId: String) async
func processItemDisappearance(_ itemId: String) async
func paginateBackwards(_ count: UInt) async -> Result<Void, RoomTimelineControllerError>
func sendMessage(_ message: String) async
}