Skip to content

Commit

Permalink
Android: Don't show analytics dialog for destroyed activity
Browse files Browse the repository at this point in the history
Should fix one of the reported crashes on Google Play. The issue can
happen if you leave the activity during directory initialization.
  • Loading branch information
JosJuice committed May 22, 2023
1 parent fede2ab commit 8a78538
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 8a78538

Please sign in to comment.