aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-10-03 21:07:45 -0700
committerAllan Wang <me@allanwang.ca>2020-10-03 21:07:45 -0700
commitd1f42ab59c86bbc7027b2337982405df78081947 (patch)
tree2bdd78eb06d489dad978cf4880c78445022d9e50 /app/src/main/kotlin/com
parent019067430fce1fdd6cc4ff0a4e63937927de2c17 (diff)
downloadfrost-d1f42ab59c86bbc7027b2337982405df78081947.tar.gz
frost-d1f42ab59c86bbc7027b2337982405df78081947.tar.bz2
frost-d1f42ab59c86bbc7027b2337982405df78081947.zip
Add setting
Diffstat (limited to 'app/src/main/kotlin/com')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt7
2 files changed, 11 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt
index ad0cb6be..f023d4af 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/BehaviourPrefs.kt
@@ -46,6 +46,8 @@ interface BehaviourPrefs : PrefsBase {
var showCreateFab: Boolean
var fullSizeImage: Boolean
+
+ var autoExpandTextBox: Boolean
}
class BehaviourPrefsImpl(
@@ -106,4 +108,6 @@ class BehaviourPrefsImpl(
"full_size_image",
oldPrefs.fullSizeImage /* false */
)
+
+ override var autoExpandTextBox: Boolean by kpref("auto_expand_text_box", true)
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
index f6110756..e38314ea 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
@@ -65,6 +65,13 @@ fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = {
descRes = R.string.force_message_bottom_desc
}
+ checkbox(
+ R.string.auto_expand_text_box,
+ prefs::autoExpandTextBox,
+ { prefs.autoExpandTextBox = it }) {
+ descRes = R.string.auto_expand_text_box_desc
+ }
+
checkbox(R.string.enable_pip, prefs::enablePip, { prefs.enablePip = it }) {
descRes = R.string.enable_pip_desc
}