diff options
| author | Mohamed Zenadi <mohamed@zenadi.com> | 2015-01-08 23:34:46 +0100 |
|---|---|---|
| committer | Mohamed Zenadi <mohamed@zenadi.com> | 2015-01-08 23:34:46 +0100 |
| commit | 82f7e5190adb8da47fc9e44135ce0b34de1da1b1 (patch) | |
| tree | 24abaabb0a4bbd686c1858d5a7dbdc1d005cb79a /app/src/main/java/com/zeapo/pwdstore/git | |
| parent | dd6155e809e3780d6d06b921a36afb2dd998d8c1 (diff) | |
| download | HardenedPass-82f7e5190adb8da47fc9e44135ce0b34de1da1b1.tar.gz HardenedPass-82f7e5190adb8da47fc9e44135ce0b34de1da1b1.zip | |
A cleaner way of testing if the repository is initialized or not
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/git')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java index ba05b939..0db20811 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java @@ -130,6 +130,13 @@ public class GitActivity extends ActionBarActivity { connection_mode_spinner.setSelection(1); connection_mode_spinner.setEnabled(false); } + + // however, if we have some saved that, that's more important! + if (connectionMode.equals("ssh-key")) { + connection_mode_spinner.setSelection(0); + } else { + connection_mode_spinner.setSelection(1); + } } @Override @@ -145,12 +152,6 @@ public class GitActivity extends ActionBarActivity { protcol_spinner.setSelection(1); } - if (connectionMode.equals("ssh-key")) { - connection_mode_spinner.setSelection(0); - } else { - connection_mode_spinner.setSelection(1); - } - // init the server information final EditText server_url = ((EditText) findViewById(R.id.server_url)); final EditText server_port = ((EditText) findViewById(R.id.server_port)); @@ -594,6 +595,10 @@ public class GitActivity extends ActionBarActivity { GitOperation op; switch (requestCode) { + case REQUEST_CLONE: + setResult(RESULT_OK); + finish(); + return; case REQUEST_PULL: op = new PullOperation(localDir, activity).setCommand(); break; |
