mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Accept space invites from a home screen cell. (#4554)
* Push the SpaceScreen after accepting an invite from the room list. * Add a test for accepting a space invite.
This commit is contained in:
@@ -14,6 +14,7 @@ struct InvitedRoomProxyMockConfiguration {
|
||||
var id = UUID().uuidString
|
||||
var name: String?
|
||||
var avatarURL: URL?
|
||||
var isSpace = false
|
||||
var members: [RoomMemberProxyMock] = .allMembers
|
||||
var inviter: RoomMemberProxyMock = .mockAlice
|
||||
}
|
||||
@@ -44,7 +45,7 @@ extension RoomInfoProxyMock {
|
||||
avatarURL = configuration.avatarURL
|
||||
|
||||
isDirect = false
|
||||
isSpace = false
|
||||
isSpace = configuration.isSpace
|
||||
successor = nil
|
||||
isFavourite = false
|
||||
canonicalAlias = nil
|
||||
|
||||
@@ -341,4 +341,49 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false,
|
||||
isTombstoned: false)
|
||||
]
|
||||
|
||||
static let mockSpaceInvites: [Element] = [
|
||||
RoomSummary(room: RoomSDKMock(),
|
||||
id: "someAwesomeSpaceID1",
|
||||
joinRequestType: .invite(inviter: RoomMemberProxyMock.mockCharlie),
|
||||
name: "First space",
|
||||
isDirect: false,
|
||||
isSpace: true,
|
||||
avatarURL: .mockMXCAvatar,
|
||||
heroes: [],
|
||||
activeMembersCount: 0,
|
||||
lastMessage: nil,
|
||||
lastMessageDate: nil,
|
||||
unreadMessagesCount: 0,
|
||||
unreadMentionsCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: "#footest:somewhere.org",
|
||||
alternativeAliases: [],
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false,
|
||||
isTombstoned: false),
|
||||
RoomSummary(room: RoomSDKMock(),
|
||||
id: "someAwesomeSpaceID2",
|
||||
joinRequestType: .invite(inviter: RoomMemberProxyMock.mockCharlie),
|
||||
name: "Second space",
|
||||
isDirect: false,
|
||||
isSpace: true,
|
||||
avatarURL: nil,
|
||||
heroes: [],
|
||||
activeMembersCount: 0,
|
||||
lastMessage: nil,
|
||||
lastMessageDate: nil,
|
||||
unreadMessagesCount: 0,
|
||||
unreadMentionsCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: nil,
|
||||
alternativeAliases: [],
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false,
|
||||
isTombstoned: false)
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user