mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
Add parameter wasLastSession to SessionListener.onSessionDeleted
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ class DefaultAnalyticsService(
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
override suspend fun onSessionDeleted(userId: String) {
|
||||
override suspend fun onSessionDeleted(userId: String, wasLastSession: Boolean) {
|
||||
// Delete the store when the last session is deleted
|
||||
if (sessionStore.getAllSessions().isEmpty()) {
|
||||
analyticsStore.reset()
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ class DefaultAnalyticsServiceTest {
|
||||
coroutineScope = backgroundScope,
|
||||
analyticsStore = store,
|
||||
)
|
||||
sut.onSessionDeleted("userId")
|
||||
sut.onSessionDeleted("userId", false)
|
||||
resetLambda.assertions().isCalledOnce()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user