mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Add some new space properties. (#4544)
* Use the via property on SpaceRoom. * Fall back to the canonical alias as a space room name if needs be. * Use SpaceRoom.isDirect for computing the name/avatar. * Pass in the parent space as a workaround for no restricted join rules.
This commit is contained in:
@@ -15,6 +15,8 @@ extension SpaceRoomProxyMock {
|
||||
var avatarURL: URL?
|
||||
|
||||
var isSpace: Bool
|
||||
var isDirect: Bool?
|
||||
var parent: SpaceRoomProxyProtocol?
|
||||
var childrenCount = 0
|
||||
|
||||
var joinedMembersCount = 0
|
||||
@@ -35,6 +37,8 @@ extension SpaceRoomProxyMock {
|
||||
name = configuration.name
|
||||
avatarURL = configuration.avatarURL
|
||||
isSpace = configuration.isSpace
|
||||
isDirect = configuration.isDirect
|
||||
parent = configuration.parent
|
||||
childrenCount = configuration.childrenCount
|
||||
joinedMembersCount = configuration.joinedMembersCount
|
||||
heroes = configuration.heroes
|
||||
@@ -125,8 +129,10 @@ extension [SpaceRoomProxyProtocol] {
|
||||
SpaceRoomProxyMock(.init(id: "!\(typeName.lowercased())3:matrix.org",
|
||||
name: "Joined \(typeName)",
|
||||
isSpace: isSpace,
|
||||
parent: SpaceRoomProxyMock(.init(name: "Company", isSpace: true)),
|
||||
joinedMembersCount: 123,
|
||||
topic: "Discussion on specific topic goes here.",
|
||||
joinRule: .restricted(rules: []),
|
||||
state: .joined))
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user