Skip to content

Commit

Permalink
refactor: dismiss loadingDialog to prevent leakage
Browse files Browse the repository at this point in the history
  • Loading branch information
goofyz committed Dec 30, 2023
1 parent fed125d commit 2863e0c
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -178,6 +178,12 @@ class PrefMainActivity : AppCompatActivity() {
requestExternalStoragePermission()
}

override fun onDestroy() {
super.onDestroy()
loadingDialog?.dismiss()
loadingDialog = null
}

private fun requestExternalStoragePermission() {
XXPermissions.with(this)
.permission(Permission.MANAGE_EXTERNAL_STORAGE)
Expand Down

0 comments on commit 2863e0c

Please sign in to comment.