mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
50 lines
1.2 KiB
Swift
50 lines
1.2 KiB
Swift
//
|
|
// MockRoomProxy.swift
|
|
// ElementX
|
|
//
|
|
// Created by Stefan Ceriu on 17.02.2022.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
import Combine
|
|
|
|
struct MockRoomProxy: RoomProxyProtocol {
|
|
let id = UUID().uuidString
|
|
let name: String? = nil
|
|
let displayName: String
|
|
|
|
let topic: String? = nil
|
|
let messages: [RoomMessageProtocol] = []
|
|
|
|
let avatarURL: String? = nil
|
|
|
|
let isDirect = Bool.random()
|
|
let isSpace = Bool.random()
|
|
let isPublic = Bool.random()
|
|
let isEncrypted = Bool.random()
|
|
let isTombstoned = Bool.random()
|
|
|
|
var callbacks = PassthroughSubject<RoomProxyCallback, Never>()
|
|
|
|
func displayName(_ completion: @escaping (Result<String, RoomProxyError>) -> Void) {
|
|
completion(.success(displayName))
|
|
}
|
|
|
|
func startLiveEventListener() {
|
|
|
|
}
|
|
|
|
func paginateBackwards(count: UInt, callback: ((Result<Void, RoomProxyError>) -> Void)?) {
|
|
|
|
}
|
|
|
|
func avatarURLForUserId(_ userId: String, completion: @escaping (Result<String?, RoomProxyError>) -> Void) {
|
|
|
|
}
|
|
|
|
func displayNameForUserId(_ userId: String, completion: @escaping (Result<String?, RoomProxyError>) -> Void) {
|
|
|
|
}
|
|
}
|