mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Refactor the JoinRoom screen to take advantage of newer APIs and support more joinRule/membership combinations (i.e. invite required, restricted, banned) (#3685)
- expose the full RoomPreview and RoomMembershipDetails through their own proxies - implement standard mocks for all the different combinations - converge on a single room info provider - rebuild all the previews - prioritise the preview data over the room one.
This commit is contained in:
@@ -61,20 +61,6 @@ enum SessionVerificationState {
|
||||
case unverified
|
||||
}
|
||||
|
||||
struct RoomPreviewDetails {
|
||||
let roomID: String
|
||||
let name: String?
|
||||
let canonicalAlias: String?
|
||||
let topic: String?
|
||||
let avatarURL: URL?
|
||||
let memberCount: UInt
|
||||
let isHistoryWorldReadable: Bool?
|
||||
let isJoined: Bool
|
||||
let isInvited: Bool
|
||||
let isPublic: Bool
|
||||
let canKnock: Bool
|
||||
}
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
var actionsPublisher: AnyPublisher<ClientProxyAction, Never> { get }
|
||||
@@ -154,7 +140,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
|
||||
func roomForIdentifier(_ identifier: String) async -> RoomProxyType?
|
||||
|
||||
func roomPreviewForIdentifier(_ identifier: String, via: [String]) async -> Result<RoomPreviewDetails, ClientProxyError>
|
||||
func roomPreviewForIdentifier(_ identifier: String, via: [String]) async -> Result<RoomPreviewProxyProtocol, ClientProxyError>
|
||||
|
||||
@discardableResult func loadUserDisplayName() async -> Result<Void, ClientProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user