When clearing cache, also reset some data store in prefs/datastore.
This commit is contained in:
parent
e566bab75d
commit
7207afebcc
10 changed files with 38 additions and 1 deletions
|
|
@ -58,4 +58,9 @@ interface AnalyticsService: AnalyticsTracker, ErrorTracker {
|
|||
* To be called when a session is destroyed.
|
||||
*/
|
||||
suspend fun onSignOut()
|
||||
|
||||
/**
|
||||
* Reset the analytics service (will ask for user consent again).
|
||||
*/
|
||||
suspend fun reset()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,10 @@ class DefaultAnalyticsService @Inject constructor(
|
|||
analyticsStore.setDidAskUserConsent()
|
||||
}
|
||||
|
||||
override suspend fun reset() {
|
||||
analyticsStore.setDidAskUserConsent(false)
|
||||
}
|
||||
|
||||
override fun getAnalyticsId(): Flow<String> {
|
||||
return analyticsStore.analyticsIdFlow
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue