Skip to content

Commit 7369426

Browse files
committed
fix dialog activity leaked bug
1 parent cc3a677 commit 7369426

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

raveandroid/src/main/java/com/flutterwave/raveandroid/account/AccountFragment.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ public void onBankSelected(Bank b) {
341341

342342
@Override
343343
public void showProgressIndicator(boolean active) {
344+
345+
if (getActivity().isFinishing()) { return; }
346+
344347
if (progessDialog == null) {
345348
progessDialog = new ProgressDialog(getActivity());
346349
progessDialog.setMessage("Please wait...");

raveandroid/src/main/java/com/flutterwave/raveandroid/card/CardFragment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ private void clearErrors() {
390390
*/
391391
@Override
392392
public void showProgressIndicator(boolean active) {
393+
394+
if (getActivity().isFinishing()) { return; }
393395
if(progessDialog == null) {
394396
progessDialog = new ProgressDialog(getActivity());
395397
progessDialog.setMessage("Please wait...");

0 commit comments

Comments
 (0)