avoiding push token registration when signed out

This commit is contained in:
Adam Brown 2022-09-26 19:51:15 +01:00
parent 8499017777
commit 0a3f1f641a
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ class SmallTalkApplication : Application(), ModuleProvider {
private fun onApplicationLaunch(notificationsModule: NotificationsModule, storeModule: StoreModule) { private fun onApplicationLaunch(notificationsModule: NotificationsModule, storeModule: StoreModule) {
applicationScope.launch { applicationScope.launch {
featureModules.pushModule.pushTokenRegistrar().registerCurrentToken() storeModule.credentialsStore().credentials()?.let {
featureModules.pushModule.pushTokenRegistrar().registerCurrentToken()
}
storeModule.localEchoStore.preload() storeModule.localEchoStore.preload()
} }