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/utils/Extensions.kt | |
| 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/utils/Extensions.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt b/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt index a3ddc170..e088097b 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt @@ -101,6 +101,8 @@ fun Context.getEncryptedPrefs(fileName: String): SharedPreferences { val Context.sharedPrefs: SharedPreferences get() = PreferenceManager.getDefaultSharedPreferences(applicationContext) +fun SharedPreferences.getString(key: String): String? = getString(key, null) + suspend fun FragmentActivity.commitChange( message: String, finishWithResultOnEnd: Intent? = null, |
