From f34ce30cc7acf3e2178a57ba0cbcb7103937c272 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 3 Jan 2019 16:24:45 +0530 Subject: GitOperation: Dismiss activity on cancel (#468) Fixes the issue where starting a repository sync and then hitting cancel in the password dialog leaves you with an empty activity which needs to be dismissed to get back to where you were. Signed-off-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java index 7f6ecd81..51ea92d3 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java @@ -203,9 +203,8 @@ public abstract class GitOperation { // authenticate using the user/pwd and then execute the command setAuthentication(username, password.getText().toString()).execute(); - }).setNegativeButton(callingActivity.getResources().getString(R.string.dialog_cancel), (dialog, whichButton) -> { - // Do nothing. - }).show(); + }) + .setNegativeButton(callingActivity.getResources().getString(R.string.dialog_cancel), (dialog, whichButton) -> callingActivity.finish()).show(); } } -- cgit v1.2.3