fix(fdroid): remove interface supertype from FirebaseMessagingDelegate stub to fix Unresolved reference compile error

This commit is contained in:
Den
2026-06-03 04:13:34 -07:00
parent 84eca3baa4
commit 87d7777bf4

View File

@@ -10,9 +10,10 @@ import java.util.*
/** /**
* Stub implementation (Firebase-free) for F-Droid builds. * Stub implementation (Firebase-free) for F-Droid builds.
* This app only uses local notifications - no FCM push tokens or remote messages. * This app only uses local notifications - no FCM push tokens or remote messages.
* Does NOT implement the interfaces.FirebaseMessagingDelegate interface to avoid
* unresolved reference errors (the interface stub is only needed for FirebaseTokenListener).
*/ */
open class FirebaseMessagingDelegate(protected val context: Context) : open class FirebaseMessagingDelegate(protected val context: Context) {
expo.modules.notifications.service.interfaces.FirebaseMessagingDelegate {
companion object { companion object {
protected var sLastToken: String? = null protected var sLastToken: String? = null
@@ -41,14 +42,14 @@ open class FirebaseMessagingDelegate(protected val context: Context) :
} }
} }
override fun onNewToken(token: String) { fun onNewToken(token: String) {
for (listenerReference in sTokenListenersReferences.values) { for (listenerReference in sTokenListenersReferences.values) {
listenerReference?.get()?.onNewToken(token) listenerReference?.get()?.onNewToken(token)
} }
sLastToken = token sLastToken = token
} }
override fun onDeletedMessages() { fun onDeletedMessages() {
// no-op // no-op
} }
} }