summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-02-01 23:41:44 +0530
committerGitHub <noreply@github.com>2020-02-01 23:41:44 +0530
commit085b946c7d3df2a7a24183b2949d4bacd5d16c5e (patch)
tree1ba3638e03ed7af9d52c8ae956be301bdf9ef8ba /app/src/main/java
parent907b22cf66f583c20b21fab69945526ed4d67e79 (diff)
Theming related fixes (#627)
* Make navigation match window background Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Remove light navigation flag Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Use black navbar in light theme windowLightNavigationBar is not portable across API 23 to 29 so we're better off with this solution Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Simplify folder dialog title UI Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Make night theme completely flat Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Remove unnecessary type Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> * Don't try to use non-existent external repo Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/UserPreference.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt1
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt7
3 files changed, 7 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
index d62f926e..bce432ea 100644
--- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
@@ -88,7 +88,7 @@ class UserPreference : AppCompatActivity() {
val clearClipboard20xPreference = findPreference<CheckBoxPreference>("clear_clipboard_20x")
// Autofill preferences
- autoFillEnablePreference = findPreference<CheckBoxPreference>("autofill_enable")
+ autoFillEnablePreference = findPreference("autofill_enable")
val autoFillAppsPreference = findPreference<Preference>("autofill_apps")
val autoFillDefaultPreference = findPreference<CheckBoxPreference>("autofill_default")
val autoFillAlwaysShowDialogPreference = findPreference<CheckBoxPreference>("autofill_always")
diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt b/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt
index b9df5613..3b00ec11 100644
--- a/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt
@@ -18,6 +18,7 @@ import java.io.File
class FolderCreationDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val alertDialogBuilder = MaterialAlertDialogBuilder(requireContext())
+ alertDialogBuilder.setTitle(R.string.title_create_folder)
alertDialogBuilder.setView(R.layout.folder_creation_dialog_fragment)
alertDialogBuilder.setPositiveButton(getString(R.string.button_create)) { _: DialogInterface, _: Int ->
createDirectory(requireArguments().getString(CURRENT_DIR_EXTRA)!!)
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt
index f6ba7d32..06608671 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt
@@ -145,9 +145,12 @@ open class PasswordRepository protected constructor() {
}
return if (settings.getBoolean("git_external", false)) {
val externalRepo = settings.getString("git_external_repo", null)
- File(requireNotNull(externalRepo))
+ if (externalRepo != null)
+ File(externalRepo)
+ else
+ File(context.filesDir.toString(), "/store")
} else {
- File(context.filesDir.toString() + "/store")
+ File(context.filesDir.toString(), "/store")
}
}