mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
02eb4b35e2
* Run swiftformat for whitespace. * Run swiftformat with some rules.
34 lines
843 B
Swift
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
|
|
}
|