Distinguish between indexable and non-indexable extra data
This commit is contained in:
parent
fa8d7b73c7
commit
fe9224b807
10 changed files with 69 additions and 11 deletions
|
|
@ -106,7 +106,7 @@ class MatrixSessionCache(
|
|||
.onSuccess { matrixClient ->
|
||||
// Add the current homeserver (hashed) to the extra info
|
||||
// This may not play well with multiple sessions, but it should work for now
|
||||
analyticsService.addUserData(AnalyticsUserData.HOMESERVER, matrixClient.userIdServerName().hash())
|
||||
analyticsService.addIndexableData(AnalyticsUserData.HOMESERVER, matrixClient.userIdServerName().hash())
|
||||
|
||||
// Add the new client to the in-memory cache
|
||||
onNewMatrixClient(matrixClient)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import io.element.android.libraries.matrix.api.sync.SyncService
|
|||
import io.element.android.libraries.matrix.api.sync.SyncState
|
||||
import io.element.android.services.analytics.api.AnalyticsService
|
||||
import io.element.android.services.analytics.api.recordTransaction
|
||||
import io.element.android.services.analyticsproviders.api.AnalyticsUserData
|
||||
import io.element.android.services.appnavstate.api.AppForegroundStateService
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
|
|
@ -77,7 +78,7 @@ class SyncOrchestrator(
|
|||
|
||||
// Wait until the sync service is not idle, either it will be running or in error/offline state
|
||||
val firstState = syncService.syncState.first { it != SyncState.Idle }
|
||||
transaction.setData("first_sync_state", firstState.name)
|
||||
transaction.putIndexableData(AnalyticsUserData.FIRST_SYNC_STATE, firstState.name)
|
||||
}
|
||||
|
||||
observeStates()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue