diff options
author | Mohamed Zenadi <mohamed@zenadi.com> | 2015-06-20 17:07:24 +0200 |
---|---|---|
committer | Mohamed Zenadi <mohamed@zenadi.com> | 2015-06-20 17:08:57 +0200 |
commit | e02cf0f2d1e1e8aa8fd561d59f6c12c9e16f1ba6 (patch) | |
tree | c6043808d57a130a88f857bf4e0eeaf8b8c461d7 /app/src/main/java/com/zeapo | |
parent | ebfdd2ebe513b66ca00de40cfaef968d44423130 (diff) |
fix an NPE that happens when the user tries to save git settings
Diffstat (limited to 'app/src/main/java/com/zeapo')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java | 7 |
1 files changed, 6 insertions, 1 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 54e192cc..aaa058ec 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java @@ -414,6 +414,12 @@ public class GitActivity extends AppCompatActivity { editor.putString("git_remote_protocol", protocol); editor.putString("git_remote_auth", connectionMode); editor.putString("git_remote_port", ((EditText) findViewById(R.id.server_port)).getText().toString()); + editor.putString("git_remote_uri", ((EditText) findViewById(R.id.clone_uri)).getText().toString()); + + if (PasswordRepository.isInitialized()) { + PasswordRepository.addRemote("origin", ((EditText) findViewById(R.id.clone_uri)).getText().toString(), true); + } + editor.apply(); } @@ -424,7 +430,6 @@ public class GitActivity extends AppCompatActivity { */ public void saveConfiguration(View view) { saveConfiguration(); - PasswordRepository.addRemote("origin", ((EditText) findViewById(R.id.clone_uri)).getText().toString(), true); finish(); } |