File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
firebase-sessions/src/main/kotlin/com/google/firebase/sessions Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ constructor(
6161 }
6262
6363 internal var previousNotificationType: NotificationType = NotificationType .GENERAL
64+ private var previousSessionId: String = " "
6465
6566 init {
6667 CoroutineScope (backgroundDispatcher).launch {
@@ -171,6 +172,10 @@ constructor(
171172
172173 private suspend fun notifySubscribers (sessionId : String , type : NotificationType ) {
173174 previousNotificationType = type
175+ if (previousSessionId == sessionId) {
176+ return
177+ }
178+ previousSessionId = sessionId
174179 FirebaseSessionsDependencies .getRegisteredSubscribers().values.forEach { subscriber ->
175180 // Notify subscribers, regardless of sampling and data collection state
176181 subscriber.onSessionChanged(SessionSubscriber .SessionDetails (sessionId))
You can’t perform that action at this time.
0 commit comments