aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt25
1 files changed, 25 insertions, 0 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
new file mode 100644
index 00000000..28554092
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
@@ -0,0 +1,25 @@
+package com.pitchedapps.frost.settings
+
+import ca.allanwang.kau.kpref.KPrefAdapterBuilder
+import com.pitchedapps.frost.R
+import com.pitchedapps.frost.SettingsActivity
+import com.pitchedapps.frost.utils.Prefs
+
+/**
+ * Created by Allan Wang on 2017-06-30.
+ */
+fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = {
+
+ checkbox(R.string.fancy_animations, { Prefs.animate }, { Prefs.animate = it; animate = it }) {
+ descRes = R.string.fancy_animations_desc
+ }
+
+ checkbox(R.string.exit_confirmation, { Prefs.exitConfirmation }, { Prefs.exitConfirmation = it }) {
+ descRes = R.string.exit_confirmation_desc
+ }
+
+ checkbox(R.string.analytics, { Prefs.analytics }, { Prefs.analytics = it }) {
+ descRes = R.string.analytics_desc
+ }
+
+}