summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAditya Wasan <adityawasan55@gmail.com>2021-05-12 01:34:12 +0530
committerGitHub <noreply@github.com>2021-05-11 20:04:12 +0000
commite6e52b35947474066ab3cd75df0f84fa15daa28f (patch)
treecf8591238f4ed345454a488d59ffe3d0c4c7df0d /app/src/main/java
parent36e23c4cb53083abf4f5912617d00786a3e83f81 (diff)
Show current copy timeout in settings (#1404)
Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt b/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt
index ca72e4b1..ff2e7a81 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/settings/PasswordSettings.kt
@@ -44,7 +44,8 @@ class PasswordSettings(private val activity: FragmentActivity) : SettingsProvide
sharedPrefs.edit { putString(PreferenceKeys.PREF_KEY_CUSTOM_DICT, uri.toString()) }
val inputStream = activity.contentResolver.openInputStream(uri)
- val customDictFile = File(activity.filesDir.toString(), XkpwdDictionary.XKPWD_CUSTOM_DICT_FILE).outputStream()
+ val customDictFile =
+ File(activity.filesDir.toString(), XkpwdDictionary.XKPWD_CUSTOM_DICT_FILE).outputStream()
inputStream?.copyTo(customDictFile, 1024)
inputStream?.close()
customDictFile.close()
@@ -100,7 +101,10 @@ class PasswordSettings(private val activity: FragmentActivity) : SettingsProvide
addPreferenceItem(customDictPathPref)
editText(PreferenceKeys.GENERAL_SHOW_TIME) {
titleRes = R.string.pref_clipboard_timeout_title
- summaryProvider = { activity.getString(R.string.pref_clipboard_timeout_summary) }
+ summaryProvider =
+ { timeout ->
+ activity.getString(R.string.pref_clipboard_timeout_summary, timeout ?: "45")
+ }
textInputType = InputType.TYPE_CLASS_NUMBER
}
checkBox(PreferenceKeys.SHOW_PASSWORD) {