Wear CWF Update dayName and Month on CWF Load

This commit is contained in:
Philoul 2023-09-05 18:39:30 +02:00
parent 76e48486cc
commit b6e73dd9a8

View file

@ -164,6 +164,8 @@ class CustomWatchface : BaseWatchFace() {
.takeIf { it.matches(Regex("E{1,4}")) } ?: "E"
monthFormat = json.optString(MONTHFORMAT.key, "MMM")
.takeIf { it.matches(Regex("M{1,4}")) } ?: "MMM"
binding.dayName.text = dateUtil.dayNameString(dayNameFormat) // Update daynName and month according to format on cwf loading
binding.month.text = dateUtil.monthString(monthFormat)
bgColor = when (singleBg.sgvLevel) {
1L -> highColor
0L -> midColor