Sort provider by index
This commit is contained in:
committed by
Benoit Marty
parent
219b97eea7
commit
05a8ca0eec
@@ -22,6 +22,10 @@ import io.element.android.libraries.matrix.api.MatrixClient
|
||||
* This is the main API for this module
|
||||
*/
|
||||
interface PushProvider {
|
||||
/**
|
||||
* Allow to sort provider, from lower index to higher index
|
||||
*/
|
||||
val index: Int
|
||||
fun getDistributorNames(): List<String>
|
||||
suspend fun registerWith(matrixClient: MatrixClient, distributorName: String)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ class FirebasePushProvider @Inject constructor(
|
||||
private val googleFcmHelper: GoogleFcmHelper,
|
||||
private val pusherSubscriber: PusherSubscriber,
|
||||
) : PushProvider {
|
||||
override val index = 0
|
||||
|
||||
override fun getDistributorNames(): List<String> {
|
||||
// Must return an non-empty list for now
|
||||
|
||||
@@ -20,7 +20,9 @@ import io.element.android.libraries.matrix.api.MatrixClient
|
||||
import io.element.android.libraries.push.providers.api.PushProvider
|
||||
import javax.inject.Inject
|
||||
|
||||
class UnifiedPushProvider @Inject constructor(): PushProvider {
|
||||
class UnifiedPushProvider @Inject constructor() : PushProvider {
|
||||
override val index = 1
|
||||
|
||||
override fun getDistributorNames(): List<String> {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user