From 1ce3ef4ea3c55d4a6c4a79f8a6cca58387b240df Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 27 Aug 2020 14:27:55 +0530 Subject: Expand show hidden folders to also cover files (#1059) * PasswordItem: only strip .gpg suffixes Signed-off-by: Harsh Shandilya * Add preference key and migration for showing all hidden contents Signed-off-by: Harsh Shandilya * Allow showing both hidden files and directories Signed-off-by: Harsh Shandilya * Add tests for hidden folder setting migration Signed-off-by: Harsh Shandilya * Add changelog entry Signed-off-by: Harsh Shandilya * Slightly improve migration logic Skip migration if old key is not found and always delete the previous key even if its set to false. Signed-off-by: Harsh Shandilya * Tweak wording Suggested-by: Fabian Henneke Signed-off-by: Harsh Shandilya * Assert previous key's removal in tests Signed-off-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt') diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt b/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt index 2bb48201..bcda4505 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt @@ -28,16 +28,21 @@ object PreferenceKeys { const val GIT_EXTERNAL = "git_external" const val GIT_EXTERNAL_REPO = "git_external_repo" const val GIT_REMOTE_AUTH = "git_remote_auth" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_LOCATION = "git_remote_location" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_PORT = "git_remote_port" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_PROTOCOL = "git_remote_protocol" const val GIT_DELETE_REPO = "git_delete_repo" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_SERVER = "git_remote_server" const val GIT_REMOTE_URL = "git_remote_url" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_USERNAME = "git_remote_username" const val GIT_SERVER_INFO = "git_server_info" @@ -55,7 +60,13 @@ object PreferenceKeys { const val REPO_CHANGED = "repo_changed" const val SEARCH_ON_START = "search_on_start" const val SHOW_EXTRA_CONTENT = "show_extra_content" + + @Deprecated( + message = "Use SHOW_HIDDEN_CONTENTS instead", + replaceWith = ReplaceWith("PreferenceKeys.SHOW_HIDDEN_CONTENTS") + ) const val SHOW_HIDDEN_FOLDERS = "show_hidden_folders" + const val SHOW_HIDDEN_CONTENTS = "show_hidden_contents" const val SORT_ORDER = "sort_order" const val SHOW_PASSWORD = "show_password" const val SSH_KEY = "ssh_key" -- cgit v1.2.3