mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Remove the protocol for SpaceServiceRoom given its a struct type. (#5000)
* Remove the protocol for SpaceServiceRoom given its a struct type. * Fix a few missed mocks in the unit tests.
This commit is contained in:
@@ -10,7 +10,7 @@ import Compound
|
||||
import SwiftUI
|
||||
|
||||
struct SpaceHeaderView: View {
|
||||
let spaceServiceRoom: SpaceServiceRoomProtocol
|
||||
let spaceServiceRoom: SpaceServiceRoom
|
||||
let mediaProvider: MediaProviderProtocol?
|
||||
|
||||
@State private var isPresentingTopic = false
|
||||
@@ -112,36 +112,36 @@ struct SpaceHeaderView_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
}
|
||||
|
||||
static func makeSpaceRooms() -> [SpaceServiceRoomMock] {
|
||||
static func makeSpaceRooms() -> [SpaceServiceRoom] {
|
||||
[
|
||||
SpaceServiceRoomMock(.init(id: "!space1:matrix.org",
|
||||
name: "Company Space",
|
||||
isSpace: true,
|
||||
childrenCount: 10,
|
||||
joinedMembersCount: 50)),
|
||||
SpaceServiceRoomMock(.init(id: "!space2:matrix.org",
|
||||
name: "Community Space",
|
||||
avatarURL: .mockMXCAvatar,
|
||||
isSpace: true,
|
||||
childrenCount: 20,
|
||||
joinedMembersCount: 78,
|
||||
topic: "Description of the space goes right here.",
|
||||
canonicalAlias: "#space:matrix.org",
|
||||
joinRule: .public)),
|
||||
SpaceServiceRoomMock(.init(id: "!space3:matrix.org",
|
||||
name: "Subspace",
|
||||
isSpace: true,
|
||||
childrenCount: 30,
|
||||
joinedMembersCount: 123,
|
||||
heroes: [.mockDan, .mockBob, .mockCharlie, .mockVerbose],
|
||||
topic: ["Description of the space goes right here.",
|
||||
"Lorem ipsum dolor sit amet consectetur.",
|
||||
"Leo viverra morbi habitant in.",
|
||||
"Sem amet enim habitant nibh augue mauris.",
|
||||
"Interdum mauris ultrices tincidunt proin morbi erat aenean risus nibh.",
|
||||
"Diam amet sit fermentum vulputate faucibus."].joined(separator: " "),
|
||||
canonicalAlias: "#subspace:matrix.org",
|
||||
joinRule: .knockRestricted(rules: [.roomMembership(roomId: "")])))
|
||||
SpaceServiceRoom.mock(id: "!space1:matrix.org",
|
||||
name: "Company Space",
|
||||
isSpace: true,
|
||||
childrenCount: 10,
|
||||
joinedMembersCount: 50),
|
||||
SpaceServiceRoom.mock(id: "!space2:matrix.org",
|
||||
name: "Community Space",
|
||||
avatarURL: .mockMXCAvatar,
|
||||
isSpace: true,
|
||||
childrenCount: 20,
|
||||
joinedMembersCount: 78,
|
||||
topic: "Description of the space goes right here.",
|
||||
canonicalAlias: "#space:matrix.org",
|
||||
joinRule: .public),
|
||||
SpaceServiceRoom.mock(id: "!space3:matrix.org",
|
||||
name: "Subspace",
|
||||
isSpace: true,
|
||||
childrenCount: 30,
|
||||
joinedMembersCount: 123,
|
||||
heroes: [.mockDan, .mockBob, .mockCharlie, .mockVerbose],
|
||||
topic: ["Description of the space goes right here.",
|
||||
"Lorem ipsum dolor sit amet consectetur.",
|
||||
"Leo viverra morbi habitant in.",
|
||||
"Sem amet enim habitant nibh augue mauris.",
|
||||
"Interdum mauris ultrices tincidunt proin morbi erat aenean risus nibh.",
|
||||
"Diam amet sit fermentum vulputate faucibus."].joined(separator: " "),
|
||||
canonicalAlias: "#subspace:matrix.org",
|
||||
joinRule: .knockRestricted(rules: [.roomMembership(roomId: "")]))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user