Do not attempt to restore the pusher after 2 removal in a short time.

This commit is contained in:
Benoit Marty 2025-11-13 23:12:57 +01:00
parent 9498e6f7fb
commit f1e12c1c1c
4 changed files with 136 additions and 11 deletions

View file

@ -23,7 +23,7 @@ import kotlinx.coroutines.flow.MutableStateFlow
class FakePushService(
private val testPushBlock: suspend (SessionId) -> Boolean = { true },
private val availablePushProviders: List<PushProvider> = emptyList(),
private val registerWithLambda: suspend (MatrixClient, PushProvider, Distributor) -> Result<Unit> = { _, _, _ ->
private val registerWithLambda: (MatrixClient, PushProvider, Distributor) -> Result<Unit> = { _, _, _ ->
Result.success(Unit)
},
private val currentPushProvider: (SessionId) -> PushProvider? = { availablePushProviders.firstOrNull() },