UnifiedPush WIP

This commit is contained in:
Benoit Marty 2023-04-11 11:19:44 +02:00 committed by Benoit Marty
parent adfcd61287
commit 95bafe4059
33 changed files with 376 additions and 215 deletions

View file

@ -46,9 +46,9 @@ class LoggedInPresenter @Inject constructor(
override fun present(): LoggedInState {
LaunchedEffect(Unit) {
// Ensure pusher is registered
// TODO Register with Firebase for now
val pushProvider = pushService.getAvailablePushProviders().firstOrNull() ?: return@LaunchedEffect
val distributor = pushProvider.getDistributorNames().firstOrNull() ?: return@LaunchedEffect
// TODO Manually select push provider for now
val pushProvider = pushService.getAvailablePushProviders().find { it.name == "UnifiedPush" } ?: return@LaunchedEffect
val distributor = pushProvider.getDistributors().first()
pushService.registerWith(matrixClient, pushProvider, distributor)
}