Skip to content

Commit

Permalink
Fix issue java.lang.IllegalStateException: Fragment already added: Lo…
Browse files Browse the repository at this point in the history
…adingDialog
  • Loading branch information
Pisey-Nguon committed Jul 7, 2022
1 parent 9ad9f79 commit bc33d46
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class MaterialLoadingDialog(private val context: Context): MaterialLoadingInterf
}

override fun dismiss() {
loadingDialog.dismissAllowingStateLoss()
if (loadingDialog.isAdded)
loadingDialog.dismissAllowingStateLoss()
}

}

0 comments on commit bc33d46

Please sign in to comment.