aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt2
-rw-r--r--app/src/web/ts/auto_resize_textarea.ts5
2 files changed, 4 insertions, 3 deletions
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 e38314ea..45a3e5c0 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
@@ -68,7 +68,7 @@ fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = {
checkbox(
R.string.auto_expand_text_box,
prefs::autoExpandTextBox,
- { prefs.autoExpandTextBox = it }) {
+ { prefs.autoExpandTextBox = it; shouldRefreshMain() }) {
descRes = R.string.auto_expand_text_box_desc
}
diff --git a/app/src/web/ts/auto_resize_textarea.ts b/app/src/web/ts/auto_resize_textarea.ts
index e170d14e..1f1b3613 100644
--- a/app/src/web/ts/auto_resize_textarea.ts
+++ b/app/src/web/ts/auto_resize_textarea.ts
@@ -1,6 +1,7 @@
// Credits to https://codepen.io/tomhodgins/pen/KgazaE
(function () {
- const textareas = <NodeListOf<HTMLTextAreaElement>>document.querySelectorAll('textarea:not(.frostAutoExpand)');
+ const classTag = 'frostAutoExpand';
+ const textareas = <NodeListOf<HTMLTextAreaElement>>document.querySelectorAll(`textarea:not(.${classTag})`);
const dataAttribute = 'data-frost-minHeight';
@@ -18,7 +19,7 @@
textareas.forEach(_frostAutoExpand);
}
textareas.forEach(el => {
- el.classList.add('frostAutoExpand')
+ el.classList.add(classTag)
const __frostAutoExpand = () => {
_frostAutoExpand(el)
};