Skip to content

Commit

Permalink
Use number format pattern for formatting state for icon URL
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Baumann <[email protected]>
  • Loading branch information
maniac103 committed Aug 14, 2023
1 parent 98aebb7 commit fd67b8b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ internal fun String?.toOH2WidgetIconResource(
}

val itemState = item?.state
var iconState = state?.asString.orEmpty()
var iconState = if (state?.asNumber != null) state.asNumber.toString() else state?.asString.orEmpty()
if (itemState != null && useState) {
if (item.isOfTypeOrGroupType(Item.Type.Color)) {
// For items that control a color item fetch the correct icon
Expand Down

0 comments on commit fd67b8b

Please sign in to comment.