Sort provider by index

This commit is contained in:
Benoit Marty 2023-04-07 21:57:55 +02:00 committed by Benoit Marty
parent 7333995630
commit 21a07fda07
4 changed files with 9 additions and 3 deletions

View file

@ -35,8 +35,7 @@ class DefaultPushService @Inject constructor(
}
override fun getAvailablePushProviders(): List<PushProvider> {
// TODO Sort by priority?
return pushProviders.toList()
return pushProviders.sortedBy { it.index }
}
override suspend fun registerWith(matrixClient: MatrixClient, pushProvider: PushProvider, distributorName: String) {