From c2d8b2551d8f1907cc7c2a98ace66ad7660464e6 Mon Sep 17 00:00:00 2001 From: Nils Behlen Date: Wed, 4 Dec 2019 15:52:53 +0100 Subject: [PATCH] make authentication request dismissable when cancelling it manually --- .../it/netknights/piauthenticator/presenter/Presenter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/it/netknights/piauthenticator/presenter/Presenter.java b/app/src/main/java/it/netknights/piauthenticator/presenter/Presenter.java index c3e3331..ee2c034 100644 --- a/app/src/main/java/it/netknights/piauthenticator/presenter/Presenter.java +++ b/app/src/main/java/it/netknights/piauthenticator/presenter/Presenter.java @@ -720,7 +720,7 @@ public void authenticationFinished(boolean success, Token token) { /** * Cancel the running Authentication Task and remove the pair from the runningAuthentications List - * + * Sets the tokens 'lastAuthHadError' so the authentication can be dismissed * @param token token of the pair */ private void deleteRunningAuthenticationFor(Token token) { @@ -735,6 +735,7 @@ private void deleteRunningAuthenticationFor(Token token) { toDelete.second.cancel(true); runningAuthentications.remove(toDelete); } + token.lastAuthHadError = true; token.state = FINISHED; }