From 2718728bb84d9386a953db5e2f5c439da7425ad0 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Sun, 11 Sep 2022 22:48:06 +0100 Subject: [PATCH] fixing wrong initial push registrar selection --- .../src/main/kotlin/app/dapk/st/push/PushTokenRegistrars.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/domains/android/push/src/main/kotlin/app/dapk/st/push/PushTokenRegistrars.kt b/domains/android/push/src/main/kotlin/app/dapk/st/push/PushTokenRegistrars.kt index 44a9679..eb29104 100644 --- a/domains/android/push/src/main/kotlin/app/dapk/st/push/PushTokenRegistrars.kt +++ b/domains/android/push/src/main/kotlin/app/dapk/st/push/PushTokenRegistrars.kt @@ -55,7 +55,7 @@ class PushTokenRegistrars( } override suspend fun registerCurrentToken() { - when (selection) { + when (currentSelection()) { FIREBASE_OPTION -> messagingPushTokenRegistrar.registerCurrentToken() NONE -> { // do nothing @@ -75,6 +75,10 @@ class PushTokenRegistrars( } } + null -> { + // do nothing + } + else -> unifiedPushRegistrar.unregister() } }