From 9f91a2ab86d589c1ddead132c245a5e5a751b95f Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 8 Apr 2020 21:09:36 +0200 Subject: [PATCH] Fixed error dialog not closing activity sometimes --- .../danoeh/antennapod/activity/OnlineFeedViewActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index 821defd86..fd4e31074 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -535,14 +535,14 @@ public class OnlineFeedViewActivity extends AppCompatActivity { } else { builder.setMessage(R.string.error_msg_prefix); } - builder.setNeutralButton(android.R.string.ok, + builder.setPositiveButton(android.R.string.ok, (dialog, which) -> dialog.cancel() ); - builder.setOnCancelListener(dialog -> { + builder.setOnDismissListener(dialog -> { setResult(RESULT_ERROR); finish(); }); - if(dialog != null && dialog.isShowing()) { + if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } dialog = builder.show();