File tree 1 file changed +5
-0
lines changed
firebase-sessions/src/main/kotlin/com/google/firebase/sessions 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ constructor(
61
61
}
62
62
63
63
internal var previousNotificationType: NotificationType = NotificationType .GENERAL
64
+ private var previousSessionId: String = " "
64
65
65
66
init {
66
67
CoroutineScope (backgroundDispatcher).launch {
@@ -171,6 +172,10 @@ constructor(
171
172
172
173
private suspend fun notifySubscribers (sessionId : String , type : NotificationType ) {
173
174
previousNotificationType = type
175
+ if (previousSessionId == sessionId) {
176
+ return
177
+ }
178
+ previousSessionId = sessionId
174
179
FirebaseSessionsDependencies .getRegisteredSubscribers().values.forEach { subscriber ->
175
180
// Notify subscribers, regardless of sampling and data collection state
176
181
subscriber.onSessionChanged(SessionSubscriber .SessionDetails (sessionId))
You can’t perform that action at this time.
0 commit comments