Fixed error dialog not closing activity sometimes

This commit is contained in:
ByteHamster 2020-04-08 21:09:36 +02:00
parent 12781c9101
commit 9f91a2ab86
1 changed files with 3 additions and 3 deletions

View File

@ -535,10 +535,10 @@ 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();
});