Fix crash when re-enabling analytics.

This commit is contained in:
Jorge Martín 2023-04-03 11:30:14 +02:00
parent 95b30bb8e9
commit 2830459b6a
1 changed files with 1 additions and 0 deletions

View File

@ -164,6 +164,7 @@ class DefaultVectorAnalytics @Inject constructor(
// When opting out, ensure that the queue is flushed first, or it will be flushed later (after user has revoked consent)
posthog?.flush()
posthog?.optOut(true)
posthog?.shutdown()
posthog = null
}
}