Update PushProvider API, remove isAvailable(), but instead rely on getDistributors() to eventually return an empty list of Distributors.
This commit is contained in:
parent
059c0dfe59
commit
90eeb6cdb1
8 changed files with 18 additions and 44 deletions
|
|
@ -38,12 +38,10 @@ class FirebasePushProvider @Inject constructor(
|
|||
override val index = FirebaseConfig.INDEX
|
||||
override val name = FirebaseConfig.NAME
|
||||
|
||||
override fun isAvailable(): Boolean {
|
||||
return isPlayServiceAvailable.isAvailable()
|
||||
}
|
||||
|
||||
override fun getDistributors(): List<Distributor> {
|
||||
return listOf(firebaseDistributor)
|
||||
return listOfNotNull(
|
||||
firebaseDistributor.takeIf { isPlayServiceAvailable.isAvailable() }
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun registerWith(matrixClient: MatrixClient, distributor: Distributor): Result<Unit> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue