Use Firebase by default and cleanup

This commit is contained in:
Benoit Marty 2023-04-11 17:02:14 +02:00 committed by Benoit Marty
parent f4a283567e
commit 7f22c6b211
4 changed files with 6 additions and 56 deletions

View file

@ -23,7 +23,7 @@ import io.element.android.libraries.matrix.api.MatrixClient
*/
interface PushProvider {
/**
* Allow to sort provider, from lower index to higher index
* Allow to sort providers, from lower index to higher index.
*/
val index: Int
@ -35,17 +35,17 @@ interface PushProvider {
fun getDistributors(): List<Distributor>
/**
* Register the pusher to the homeserver
* Register the pusher to the homeserver.
*/
suspend fun registerWith(matrixClient: MatrixClient, distributor: Distributor)
/**
* Unregister the pusher
* Unregister the pusher.
*/
suspend fun unregister(matrixClient: MatrixClient)
/**
* Attempt to troubleshoot the push provider
* Attempt to troubleshoot the push provider.
*/
suspend fun troubleshoot(): Result<Unit>
}

View file

@ -21,7 +21,6 @@ import io.element.android.libraries.matrix.api.MatrixClient
import io.element.android.libraries.push.providers.api.Distributor
import io.element.android.libraries.push.providers.api.PushProvider
import io.element.android.libraries.push.providers.api.PusherSubscriber
import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecret
import timber.log.Timber
import javax.inject.Inject
@ -31,7 +30,6 @@ class FirebasePushProvider @Inject constructor(
private val firebaseStore: FirebaseStore,
private val firebaseTroubleshooter: FirebaseTroubleshooter,
private val pusherSubscriber: PusherSubscriber,
private val pushClientSecret: PushClientSecret,
) : PushProvider {
override val index = FirebaseConfig.index
override val name = FirebaseConfig.name