Android: Don't show analytics dialog for destroyed activity
Should fix one of the reported crashes on Google Play. The issue can happen if you leave the activity during directory initialization.
This commit is contained in:
parent
fede2ab9a9
commit
8a78538b2d
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue