Fixed static

This commit is contained in:
Vladimir 2020-06-10 16:52:30 +03:00
parent 9eec9dffe3
commit 37c4d284fa
1 changed files with 1 additions and 3 deletions

View File

@ -94,9 +94,7 @@ class TouchinSharedPreferences(name: String, context: Context, val isEncryption:
override fun putString(key: String?, value: String?) = put(key, value)
private fun <T> put(key: String?, value: T): SharedPreferences.Editor {
return currentPreferences.edit().putString(key, value.toString().encrypt())
}
private fun <T> put(key: String?, value: T) = currentPreferences.edit().putString(key, value.toString().encrypt())
private fun String.encrypt() = if (isEncryption) cryptoUtils.encrypt(this) else this