mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Improve API, to avoid ignoring errors
This commit is contained in:
committed by
Benoit Marty
parent
d88ef8769e
commit
a65c290dd3
+2
-2
@@ -42,7 +42,7 @@ interface PushProvider {
|
||||
/**
|
||||
* Register the pusher to the homeserver.
|
||||
*/
|
||||
suspend fun registerWith(matrixClient: MatrixClient, distributor: Distributor)
|
||||
suspend fun registerWith(matrixClient: MatrixClient, distributor: Distributor): Result<Unit>
|
||||
|
||||
/**
|
||||
* Return the current distributor, or null if none.
|
||||
@@ -52,7 +52,7 @@ interface PushProvider {
|
||||
/**
|
||||
* Unregister the pusher.
|
||||
*/
|
||||
suspend fun unregister(matrixClient: MatrixClient)
|
||||
suspend fun unregister(matrixClient: MatrixClient): Result<Unit>
|
||||
|
||||
suspend fun getCurrentUserPushConfig(): CurrentUserPushConfig?
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,6 +19,6 @@ package io.element.android.libraries.pushproviders.api
|
||||
import io.element.android.libraries.matrix.api.MatrixClient
|
||||
|
||||
interface PusherSubscriber {
|
||||
suspend fun registerPusher(matrixClient: MatrixClient, pushKey: String, gateway: String)
|
||||
suspend fun unregisterPusher(matrixClient: MatrixClient, pushKey: String, gateway: String)
|
||||
suspend fun registerPusher(matrixClient: MatrixClient, pushKey: String, gateway: String): Result<Unit>
|
||||
suspend fun unregisterPusher(matrixClient: MatrixClient, pushKey: String, gateway: String): Result<Unit>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user