-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Stuck on Setting up Wire after canceling E2EI during login WPB-1…
…0046] 🍒
- Loading branch information
1 parent
afefda7
commit 1438f23
Showing
7 changed files
with
213 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...e/kalium/logic/util/arrangement/usecase/IsAllowedToRegisterMLSClientUseCaseArrangement.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.wire.kalium.logic.util.arrangement.usecase | ||
|
||
import com.wire.kalium.logic.feature.client.IsAllowedToRegisterMLSClientUseCase | ||
import com.wire.kalium.util.DelicateKaliumApi | ||
import io.mockative.coEvery | ||
import io.mockative.mock | ||
|
||
@OptIn(DelicateKaliumApi::class) | ||
interface IsAllowedToRegisterMLSClientUseCaseArrangement { | ||
|
||
val isAllowedToRegisterMLSClientUseCase: IsAllowedToRegisterMLSClientUseCase | ||
|
||
suspend fun withIsAllowedToRegisterMLSClient(isAllowed: Boolean) | ||
} | ||
|
||
@OptIn(DelicateKaliumApi::class) | ||
class IsAllowedToRegisterMLSClientUseCaseArrangementImpl : IsAllowedToRegisterMLSClientUseCaseArrangement { | ||
|
||
override val isAllowedToRegisterMLSClientUseCase: IsAllowedToRegisterMLSClientUseCase = mock(IsAllowedToRegisterMLSClientUseCase::class) | ||
|
||
override suspend fun withIsAllowedToRegisterMLSClient(isAllowed: Boolean) { | ||
coEvery { isAllowedToRegisterMLSClientUseCase() }.returns(isAllowed) | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...lin/com/wire/kalium/logic/util/arrangement/usecase/RegisterMLSClientUseCaseArrangement.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.wire.kalium.logic.util.arrangement.usecase | ||
|
||
import com.wire.kalium.logic.CoreFailure | ||
import com.wire.kalium.logic.feature.client.RegisterMLSClientResult | ||
import com.wire.kalium.logic.feature.client.RegisterMLSClientUseCase | ||
import com.wire.kalium.logic.functional.Either | ||
import io.mockative.any | ||
import io.mockative.coEvery | ||
import io.mockative.mock | ||
|
||
interface RegisterMLSClientUseCaseArrangement { | ||
|
||
val registerMLSClientUseCase: RegisterMLSClientUseCase | ||
|
||
suspend fun withRegisterMLSClient(result: Either<CoreFailure, RegisterMLSClientResult>) | ||
} | ||
|
||
class RegisterMLSClientUseCaseArrangementImpl : RegisterMLSClientUseCaseArrangement { | ||
override val registerMLSClientUseCase: RegisterMLSClientUseCase = mock(RegisterMLSClientUseCase::class) | ||
|
||
override suspend fun withRegisterMLSClient(result: Either<CoreFailure, RegisterMLSClientResult>) { | ||
coEvery { registerMLSClientUseCase(any()) }.returns(result) | ||
} | ||
|
||
} |