Merge pull request #11835 from JosJuice/android-analytics-race

Android: Don't show analytics dialog for destroyed activity
This commit is contained in:
Charles Lombardo 2023-05-28 17:14:36 -04:00 committed by GitHub
commit faa2b28e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ object Analytics {
@JvmStatic
fun checkAnalyticsInit(activity: FragmentActivity) {
AfterDirectoryInitializationRunner().runWithoutLifecycle {
AfterDirectoryInitializationRunner().runWithLifecycle(activity) {
if (!BooleanSetting.MAIN_ANALYTICS_PERMISSION_ASKED.boolean) {
AnalyticsDialog().show(activity.supportFragmentManager, AnalyticsDialog.TAG)
}