File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
firebase-messaging/src/jsMain/kotlin/dev/gitlive/firebase/messaging Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -3,24 +3,21 @@ package dev.gitlive.firebase.messaging
33import dev.gitlive.firebase.Firebase
44import dev.gitlive.firebase.messaging.externals.Messaging
55import dev.gitlive.firebase.messaging.externals.getMessaging
6- import kotlinx.coroutines.GlobalScope
76import kotlinx.coroutines.await
8- import kotlinx.coroutines.launch
7+
98
109actual val Firebase .messaging: FirebaseMessaging
1110 get() = FirebaseMessaging (getMessaging())
1211
1312actual class FirebaseMessaging (val js : Messaging ) {
1413 actual fun subscribeToTopic (topic : String ) {
15- GlobalScope .launch {
16- js.subscribeToTopic(arrayOf(getToken()), topic)
17- }
14+ // This is not supported in the JS SDK
15+ // https://firebase.google.com/docs/reference/js/messaging_.md#@firebase/messaging
1816 }
1917
2018 actual fun unsubscribeFromTopic (topic : String ) {
21- GlobalScope .launch {
22- js.unsubscribeFromTopic(arrayOf(getToken()), topic)
23- }
19+ // This is not supported in the JS SDK
20+ // https://firebase.google.com/docs/reference/js/messaging_.md#@firebase/messaging
2421 }
2522
2623 actual suspend fun getToken (): String = dev.gitlive.firebase.messaging.externals.getToken(js).await()
You can’t perform that action at this time.
0 commit comments