diff options
| author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-08-16 02:16:02 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-15 22:46:02 +0200 |
| commit | 2ffd1abb279bb0e1a8895ef26b805a1a1651516c (patch) | |
| tree | ddfa9512a7b6e8944286a23d0055174c4e16b406 /app/src/main/java/com/zeapo/pwdstore/utils | |
| parent | 7bb40d109aadf49efc6b4a8b42b36eb27dd502f4 (diff) | |
| download | HardenedPass-2ffd1abb279bb0e1a8895ef26b805a1a1651516c.tar.gz HardenedPass-2ffd1abb279bb0e1a8895ef26b805a1a1651516c.zip | |
Fix external storage UX (#1022)
* build: update to Kotlin 1.4
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* UserPreference: finish if directory selection was triggered from an intent
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* PasswordStore: switch permission request to ActivityResultContracts
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* PasswordStore: fix activity reference
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* GitOperationActivity: make invalid values more obvious
Would have caught this issue much sooner if I had just done this
Fixes: 3d8cea596600 ("Improve permission handling logic (#732)")
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Assorted collection of hackery to make external storage use palatable
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Update changelog
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/utils')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt | 2 |
1 files changed, 1 insertions, 1 deletions
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 0a918d0c..8a49f0e3 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt @@ -169,7 +169,7 @@ open class PasswordRepository protected constructor() { val dir = getRepositoryDirectory() // uninitialize the repo if the dir does not exist or is absolutely empty settings.edit { - if (!dir.exists() || !dir.isDirectory || dir.listFiles()!!.isEmpty()) { + if (!dir.exists() || !dir.isDirectory || dir.listFiles()?.isEmpty() == true) { putBoolean(PreferenceKeys.REPOSITORY_INITIALIZED, false) } else { putBoolean(PreferenceKeys.REPOSITORY_INITIALIZED, true) |
