mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +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:
@@ -908,7 +908,9 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
private func presentKnockRequestsList() {
|
||||
let parameters = KnockRequestsListScreenCoordinatorParameters(roomProxy: roomProxy, mediaProvider: userSession.mediaProvider)
|
||||
let parameters = KnockRequestsListScreenCoordinatorParameters(roomProxy: roomProxy,
|
||||
mediaProvider: userSession.mediaProvider,
|
||||
userIndicatorController: userIndicatorController)
|
||||
let coordinator = KnockRequestsListScreenCoordinator(parameters: parameters)
|
||||
|
||||
navigationStackCoordinator.push(coordinator) { [weak self] in
|
||||
@@ -1723,14 +1725,3 @@ private extension RoomFlowCoordinator {
|
||||
case dismissSecurityAndPrivacyScreen
|
||||
}
|
||||
}
|
||||
|
||||
private extension Result {
|
||||
var isFailure: Bool {
|
||||
switch self {
|
||||
case .success:
|
||||
return false
|
||||
case .failure:
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case .unknownDevice, .unsignedDevice: .ExpectedSentByInsecureDevice
|
||||
case .verificationViolation: .ExpectedVerificationViolation
|
||||
case .sentBeforeWeJoined: .ExpectedDueToMembership
|
||||
case .historicalMessage: .HistoricalMessage
|
||||
case .historicalMessageAndBackupIsDisabled, .historicalMessageAndDeviceIsUnverified: .HistoricalMessage
|
||||
case .withheldForUnverifiedOrInsecureDevice: .RoomKeysWithheldForUnverifiedDevice
|
||||
case .withheldBySender: .OlmKeysNotSentError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user