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 <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2019-01-03 16:24:45 +05:30 committed by حسين
parent 249248e168
commit f34ce30cc7

View file

@ -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();
}
}