When clearing cache, also reset some data store in prefs/datastore.
This commit is contained in:
committed by
Benoit Marty
parent
12a4882cc8
commit
d6980025ca
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user