mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Render an error dialog in case registering a pusher fails.
This commit is contained in:
committed by
Benoit Marty
parent
21ce1c40b3
commit
725c3838af
+13
@@ -17,8 +17,21 @@
|
||||
package io.element.android.libraries.pushproviders.api
|
||||
|
||||
import io.element.android.libraries.matrix.api.MatrixClient
|
||||
import io.element.android.libraries.matrix.api.exception.ClientException
|
||||
|
||||
interface PusherSubscriber {
|
||||
/**
|
||||
* Register a pusher. Note that failure will be a [RegistrationFailure].
|
||||
*/
|
||||
suspend fun registerPusher(matrixClient: MatrixClient, pushKey: String, gateway: String): Result<Unit>
|
||||
|
||||
/**
|
||||
* Unregister a pusher.
|
||||
*/
|
||||
suspend fun unregisterPusher(matrixClient: MatrixClient, pushKey: String, gateway: String): Result<Unit>
|
||||
}
|
||||
|
||||
class RegistrationFailure(
|
||||
val clientException: ClientException,
|
||||
val isRegisteringAgain: Boolean
|
||||
) : Exception(clientException)
|
||||
|
||||
Reference in New Issue
Block a user