Safer code

This commit is contained in:
Benoit Marty
2023-04-08 00:28:13 +02:00
committed by Benoit Marty
parent 1f87e10376
commit adfcd61287

View File

@@ -48,7 +48,8 @@ class LoggedInPresenter @Inject constructor(
// Ensure pusher is registered
// TODO Register with Firebase for now
val pushProvider = pushService.getAvailablePushProviders().firstOrNull() ?: return@LaunchedEffect
pushService.registerWith(matrixClient, pushProvider, pushProvider.getDistributorNames().first())
val distributor = pushProvider.getDistributorNames().firstOrNull() ?: return@LaunchedEffect
pushService.registerWith(matrixClient, pushProvider, distributor)
}
val permissionsState = postNotificationPermissionsPresenter.present()