Merge pull request #2976 from Philoul/wear/new_custom_watchface

Wear CWF Fix Invalid keys for TopOffset, LeftOffset and RotationOffset steps
This commit is contained in:
Milos Kozak 2023-10-25 00:08:55 +02:00 committed by GitHub
commit a909f8653a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -268,6 +268,9 @@ enum class JsonKeys(val key: String) {
DYNPREF("dynPref"),
DYNPREFCOLOR("dynPrefColor"),
PREFKEY("prefKey"),
INVALIDTOPOFFSET("invalidTopOffset"),
INVALIDLEFTOFFSET("invalidLeftOffset"),
INVALIDROTATIONOFFSET("invalidRotationOffset"),
DEFAULT("default")
}

View file

@ -819,9 +819,9 @@ class CustomWatchface : BaseWatchFace() {
getColorSteps(dynColor, COLOR.key, INVALIDCOLOR.key)
getColorSteps(dynFontColor, FONTCOLOR.key, INVALIDFONTCOLOR.key)
getIntSteps(dynTextSize, TEXTSIZE.key, INVALIDTEXTSIZE.key)
getIntSteps(dynLeftOffset, LEFTOFFSET.key, INVALIDTEXTSIZE.key)
getIntSteps(dynTopOffset, TOPOFFSET.key, INVALIDTEXTSIZE.key)
getIntSteps(dynRotationOffset, ROTATIONOFFSET.key, INVALIDTEXTSIZE.key)
getIntSteps(dynLeftOffset, LEFTOFFSET.key, INVALIDLEFTOFFSET.key)
getIntSteps(dynTopOffset, TOPOFFSET.key, INVALIDTOPOFFSET.key)
getIntSteps(dynRotationOffset, ROTATIONOFFSET.key, INVALIDROTATIONOFFSET.key)
}
private fun getDrawableSteps(dynMap: MutableMap<Int, Drawable?>, key: String, invalidKey: String) {