File tree 1 file changed +3
-23
lines changed
Loop Widget Extension/Components
1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ struct GlucoseView: View {
29
29
. font ( . system( size: 24 , weight: . heavy, design: . default) )
30
30
}
31
31
32
- if let trendImageName = getArrowImage ( ) {
33
- Image ( systemName: trendImageName)
32
+ if let trendImage = entry. sensor? . trendType? . image {
33
+ Image ( uiImage: trendImage)
34
+ . renderingMode ( . template)
34
35
}
35
36
}
36
37
. foregroundColor ( entry. glucoseStatusIsStale ? . staleGray : . primary)
@@ -52,25 +53,4 @@ struct GlucoseView: View {
52
53
}
53
54
}
54
55
}
55
-
56
- private func getArrowImage( ) -> String ? {
57
- switch entry. sensor? . trendType {
58
- case . upUpUp:
59
- return " arrow.double.up.circle "
60
- case . upUp:
61
- return " arrow.up.circle "
62
- case . up:
63
- return " arrow.up.right.circle "
64
- case . flat:
65
- return " arrow.right.circle "
66
- case . down:
67
- return " arrow.down.right.circle "
68
- case . downDown:
69
- return " arrow.down.circle "
70
- case . downDownDown:
71
- return " arrow.double.down.circle "
72
- case . none:
73
- return nil
74
- }
75
- }
76
56
}
You can’t perform that action at this time.
0 commit comments