mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
android: settings: Dynamically evaluate valueAsString
Co-Authored-By: bunnei <bunneidev@gmail.com>
This commit is contained in:
parent
2d934720f5
commit
c385b2b07b
4 changed files with 4 additions and 4 deletions
|
@ -8,5 +8,5 @@ class BooleanSetting(
|
||||||
section: String,
|
section: String,
|
||||||
var value: Boolean
|
var value: Boolean
|
||||||
) : Setting(key, section) {
|
) : Setting(key, section) {
|
||||||
override val valueAsString = if (value) "True" else "False"
|
override val valueAsString get() = if (value) "True" else "False"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@ class FloatSetting(
|
||||||
section: String,
|
section: String,
|
||||||
var value: Float
|
var value: Float
|
||||||
) : Setting(key, section) {
|
) : Setting(key, section) {
|
||||||
override val valueAsString = value.toString()
|
override val valueAsString get() = value.toString()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@ class IntSetting(
|
||||||
section: String,
|
section: String,
|
||||||
var value: Int
|
var value: Int
|
||||||
) : Setting(key, section) {
|
) : Setting(key, section) {
|
||||||
override val valueAsString = value.toString()
|
override val valueAsString get() = value.toString()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@ class StringSetting(
|
||||||
section: String,
|
section: String,
|
||||||
var value: String
|
var value: String
|
||||||
) : Setting(key, section) {
|
) : Setting(key, section) {
|
||||||
override var valueAsString = value
|
override val valueAsString get() = value
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue