diff options
| author | Fabian Henneke <FabianHenneke@users.noreply.github.com> | 2020-08-11 18:11:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-11 18:11:39 +0200 |
| commit | 15aa92980239d6d61c3b0febc0407b7f63e152b3 (patch) | |
| tree | 92b25ea3bca41e37fe4727bab82665b04ee8206e /app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd | |
| parent | 8f957ca99454efe1711e2424620d2632bed6cb63 (diff) | |
| download | HardenedPass-15aa92980239d6d61c3b0febc0407b7f63e152b3.tar.gz HardenedPass-15aa92980239d6d61c3b0febc0407b7f63e152b3.zip | |
Switch to URL-based Git config and refactor Git settings (#1008)
* Make Git config URL-based and refactor
* Use Kotlin style null handling for string prefs
* Also show an error if generated URL can't be parsed
* Add some testcases for migration strategy
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd/XkpwdDictionary.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd/XkpwdDictionary.kt b/app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd/XkpwdDictionary.kt index 3edaa5da..2d0fbee9 100644 --- a/app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd/XkpwdDictionary.kt +++ b/app/src/main/java/com/zeapo/pwdstore/pwgenxkpwd/XkpwdDictionary.kt @@ -5,9 +5,9 @@ package com.zeapo.pwdstore.pwgenxkpwd import android.content.Context -import androidx.preference.PreferenceManager import com.zeapo.pwdstore.R import com.zeapo.pwdstore.utils.PreferenceKeys +import com.zeapo.pwdstore.utils.getString import com.zeapo.pwdstore.utils.sharedPrefs import java.io.File @@ -17,7 +17,7 @@ class XkpwdDictionary(context: Context) { init { val prefs = context.sharedPrefs - val uri = prefs.getString(PreferenceKeys.PREF_KEY_CUSTOM_DICT, "")!! + val uri = prefs.getString(PreferenceKeys.PREF_KEY_CUSTOM_DICT) ?: "" val customDictFile = File(context.filesDir, XKPWD_CUSTOM_DICT_FILE) val lines = if (prefs.getBoolean(PreferenceKeys.PREF_KEY_IS_CUSTOM_DICT, false) && |
