From 3821e056eaa91521b3d175bec533b71a22e51604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=C2=A0Koby=C5=82ko?= Date: Sun, 5 Nov 2023 22:48:50 +0100 Subject: [PATCH] Send empty FCM token for Browser Extension when Google Services not available --- .../twofasapp/data/browserext/BrowserExtRepositoryImpl.kt | 6 +++++- gradle/libs.versions.toml | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/data/browserext/src/main/java/com/twofasapp/data/browserext/BrowserExtRepositoryImpl.kt b/data/browserext/src/main/java/com/twofasapp/data/browserext/BrowserExtRepositoryImpl.kt index 5e58b46a..550582f1 100644 --- a/data/browserext/src/main/java/com/twofasapp/data/browserext/BrowserExtRepositoryImpl.kt +++ b/data/browserext/src/main/java/com/twofasapp/data/browserext/BrowserExtRepositoryImpl.kt @@ -113,7 +113,11 @@ internal class BrowserExtRepositoryImpl( } override suspend fun getFcmToken(): String { - return FirebaseMessaging.getInstance().token.await() + return try { + FirebaseMessaging.getInstance().token.await().orEmpty() + } catch (e: Exception) { + "" + } } override suspend fun deleteTokenRequest(requestId: String) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7c738726..f7eadf74 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] -accompanist = "0.33.2-alpha" +accompanist = "0.32.0" agp = "8.2.0-rc02" cameraX = "1.3.0" coil = "2.4.0" commonmark = "0.21.0" -compose = "1.6.0-alpha08" +compose = "1.5.4" composeActivity = "1.8.0" composeCompiler = "1.5.3" core = "1.12.0" @@ -18,7 +18,7 @@ kotlinCoroutines = "1.7.3" kotlinKsp = "1.9.10-1.0.13" ktor = "2.3.4" lifecycle = "2.7.0-beta01" -material3 = "1.2.0-alpha10" +material3 = "1.2.0-alpha08" room = "2.6.0" [libraries]