mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
element-hq/element-x-ios/issues/2670 - Show invites as part of the room list
This commit is contained in:
committed by
Stefan Ceriu
parent
d34ec30ca6
commit
064626fbbe
@@ -1,4 +1,4 @@
|
||||
// Generated using Sourcery 2.1.8 — https://github.com/krzysztofzablocki/Sourcery
|
||||
// Generated using Sourcery 2.2.2 — https://github.com/krzysztofzablocki/Sourcery
|
||||
// DO NOT EDIT
|
||||
|
||||
// swiftlint:disable all
|
||||
@@ -478,16 +478,16 @@ class SDKClientMock: SDKClientProtocol {
|
||||
}
|
||||
public var loginUsernamePasswordInitialDeviceNameDeviceIdReceivedArguments: (username: String, password: String, initialDeviceName: String?, deviceId: String?)?
|
||||
public var loginUsernamePasswordInitialDeviceNameDeviceIdReceivedInvocations: [(username: String, password: String, initialDeviceName: String?, deviceId: String?)] = []
|
||||
public var loginUsernamePasswordInitialDeviceNameDeviceIdClosure: ((String, String, String?, String?) throws -> Void)?
|
||||
public var loginUsernamePasswordInitialDeviceNameDeviceIdClosure: ((String, String, String?, String?) async throws -> Void)?
|
||||
|
||||
public func login(username: String, password: String, initialDeviceName: String?, deviceId: String?) throws {
|
||||
public func login(username: String, password: String, initialDeviceName: String?, deviceId: String?) async throws {
|
||||
if let error = loginUsernamePasswordInitialDeviceNameDeviceIdThrowableError {
|
||||
throw error
|
||||
}
|
||||
loginUsernamePasswordInitialDeviceNameDeviceIdCallsCount += 1
|
||||
loginUsernamePasswordInitialDeviceNameDeviceIdReceivedArguments = (username: username, password: password, initialDeviceName: initialDeviceName, deviceId: deviceId)
|
||||
loginUsernamePasswordInitialDeviceNameDeviceIdReceivedInvocations.append((username: username, password: password, initialDeviceName: initialDeviceName, deviceId: deviceId))
|
||||
try loginUsernamePasswordInitialDeviceNameDeviceIdClosure?(username, password, initialDeviceName, deviceId)
|
||||
try await loginUsernamePasswordInitialDeviceNameDeviceIdClosure?(username, password, initialDeviceName, deviceId)
|
||||
}
|
||||
//MARK: - logout
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@ extension RoomSummaryProviderMock {
|
||||
extension Array where Element == RoomSummary {
|
||||
static let mockRooms: [Element] = [
|
||||
.filled(details: RoomSummaryDetails(id: "1",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Foundation 🔭🪐🌌",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -89,11 +91,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: .allMessages,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "2",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Foundation and Empire",
|
||||
isDirect: false,
|
||||
avatarURL: URL.picturesDirectory,
|
||||
@@ -104,11 +107,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 2,
|
||||
notificationMode: .mute,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "3",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Second Foundation",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -119,11 +123,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: .mentionsAndKeywordsOnly,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "4",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Foundation's Edge",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -134,11 +139,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 2,
|
||||
notificationMode: .allMessages,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "5",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Foundation and Earth",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
@@ -149,11 +155,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 1,
|
||||
notificationMode: .allMessages,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: true,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "6",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Prelude to Foundation",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
@@ -164,11 +171,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: .mute,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: true,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "0",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: "Unknown",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -179,7 +187,6 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: nil,
|
||||
inviter: nil,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
@@ -216,7 +223,10 @@ extension Array where Element == RoomSummary {
|
||||
}()
|
||||
|
||||
static let mockInvites: [Element] = [
|
||||
.filled(details: RoomSummaryDetails(id: "someAwesomeRoomId1", name: "First room",
|
||||
.filled(details: RoomSummaryDetails(id: "someAwesomeRoomId1",
|
||||
isInvite: false,
|
||||
inviter: RoomMemberProxyMock.mockCharlie,
|
||||
name: "First room",
|
||||
isDirect: false,
|
||||
avatarURL: URL.picturesDirectory,
|
||||
lastMessage: nil,
|
||||
@@ -226,11 +236,12 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: "#footest:somewhere.org",
|
||||
inviter: RoomMemberProxyMock.mockCharlie,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false)),
|
||||
.filled(details: RoomSummaryDetails(id: "someAwesomeRoomId2",
|
||||
isInvite: false,
|
||||
inviter: RoomMemberProxyMock.mockCharlie,
|
||||
name: "Second room",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
@@ -241,7 +252,6 @@ extension Array where Element == RoomSummary {
|
||||
unreadNotificationsCount: 0,
|
||||
notificationMode: nil,
|
||||
canonicalAlias: nil,
|
||||
inviter: RoomMemberProxyMock.mockCharlie,
|
||||
hasOngoingCall: false,
|
||||
isMarkedUnread: false,
|
||||
isFavourite: false))
|
||||
|
||||
Reference in New Issue
Block a user