mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 06:45:19 +00:00
save the selected directory and show it as a summary
This commit is contained in:
@@ -46,8 +46,6 @@ public class UserPreference extends AppCompatActivity {
|
|||||||
final UserPreference callingActivity = (UserPreference) getActivity();
|
final UserPreference callingActivity = (UserPreference) getActivity();
|
||||||
final SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences();
|
final SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences();
|
||||||
|
|
||||||
addPreferencesFromResource(R.xml.preference);
|
|
||||||
|
|
||||||
Preference keyPref = findPreference("openpgp_key_id_pref");
|
Preference keyPref = findPreference("openpgp_key_id_pref");
|
||||||
String selectedKeys = sharedPreferences.getString("openpgp_key_ids", "");
|
String selectedKeys = sharedPreferences.getString("openpgp_key_ids", "");
|
||||||
if (Strings.isNullOrEmpty(selectedKeys)) {
|
if (Strings.isNullOrEmpty(selectedKeys)) {
|
||||||
@@ -221,5 +219,13 @@ public class UserPreference extends AppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// why do they have to use a different resultCode than OK :/
|
||||||
|
if (requestCode == SELECT_GIT_DIRECTORY && resultCode == DirectoryChooserActivity.RESULT_CODE_DIR_SELECTED) {
|
||||||
|
PreferenceManager.getDefaultSharedPreferences(getApplicationContext())
|
||||||
|
.edit()
|
||||||
|
.putString("git_external_repo", data.getStringExtra(DirectoryChooserActivity.RESULT_SELECTED_DIR))
|
||||||
|
.commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user