mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Implement Knock Logic (#3573)
* WIP RequestToJoin struct * implemented the logic to display the cells * knock request banner accept flow * mark all knocks as seen implemented * details logic * implemented accept, decline and ban in the list * added a loader and modified the stacked view of the banner * pr suggestions * updated naming and loading strings * added the initial loading state improved code and the tests * updated a string that has changed * code improvement * tests for the room screen view model * room details tests and improved the knock requests tests for the room screen * knock requests list tests * added error state alerts with retry * struct has been renamed on the sdk so I renamed it also on the app side * update SDK
This commit is contained in:
@@ -71,7 +71,7 @@ extension Array where Element == RoomSummary {
|
||||
static let mockRooms: [Element] = [
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "1",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Foundation 🔭🪐🌌",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -88,7 +88,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "2",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Foundation and Empire",
|
||||
isDirect: false,
|
||||
avatarURL: .mockMXCAvatar,
|
||||
@@ -105,7 +105,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "3",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Second Foundation",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -122,7 +122,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "4",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Foundation's Edge",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -139,7 +139,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "5",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Foundation and Earth",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
@@ -156,7 +156,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "6",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Prelude to Foundation",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
@@ -173,7 +173,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "0",
|
||||
joinRequestType: nil,
|
||||
knockRequestType: nil,
|
||||
name: "Unknown",
|
||||
isDirect: false,
|
||||
avatarURL: nil,
|
||||
@@ -223,7 +223,7 @@ extension Array where Element == RoomSummary {
|
||||
static let mockInvites: [Element] = [
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "someAwesomeRoomId1",
|
||||
joinRequestType: .invite(inviter: RoomMemberProxyMock.mockCharlie),
|
||||
knockRequestType: .invite(inviter: RoomMemberProxyMock.mockCharlie),
|
||||
name: "First room",
|
||||
isDirect: false,
|
||||
avatarURL: .mockMXCAvatar,
|
||||
@@ -240,7 +240,7 @@ extension Array where Element == RoomSummary {
|
||||
isFavourite: false),
|
||||
RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "someAwesomeRoomId2",
|
||||
joinRequestType: .invite(inviter: RoomMemberProxyMock.mockCharlie),
|
||||
knockRequestType: .invite(inviter: RoomMemberProxyMock.mockCharlie),
|
||||
name: "Second room",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
|
||||
Reference in New Issue
Block a user