@@ -19,15 +19,17 @@ import androidx.compose.ui.Modifier
19
19
import androidx.compose.ui.graphics.Color
20
20
import androidx.compose.ui.text.font.FontWeight
21
21
import androidx.compose.ui.text.style.TextAlign
22
+ import androidx.compose.ui.text.style.TextDecoration
22
23
import androidx.compose.ui.text.style.TextOverflow
23
24
import androidx.compose.ui.unit.dp
24
25
import androidx.compose.ui.unit.sp
25
26
import com.sunkensplashstudios.VRCRoboScout.Match
27
+ import com.sunkensplashstudios.VRCRoboScout.Team
26
28
import com.sunkensplashstudios.VRCRoboScout.ui.theme.allianceBlue
27
29
import com.sunkensplashstudios.VRCRoboScout.ui.theme.allianceRed
28
30
29
31
@Composable
30
- fun MatchesView (matchList : List <Match >) {
32
+ fun MatchesView (matchList : List <Match >, team : Team ? = null ) {
31
33
val timeFormat = java.text.SimpleDateFormat (" h:mm a" , java.util.Locale .getDefault())
32
34
Column (
33
35
modifier = Modifier .verticalScroll(rememberScrollState())
@@ -79,7 +81,8 @@ fun MatchesView(matchList: List<Match>) {
79
81
Text (
80
82
text = member.team.name,
81
83
fontSize = 15 .sp,
82
- color = allianceRed
84
+ color = allianceRed,
85
+ textDecoration = if (team != null && member.team.id == team.id) TextDecoration .Underline else TextDecoration .None
83
86
)
84
87
}
85
88
}
@@ -91,7 +94,8 @@ fun MatchesView(matchList: List<Match>) {
91
94
fontWeight = FontWeight .Bold ,
92
95
color = allianceRed,
93
96
textAlign = TextAlign .Start ,
94
- modifier = Modifier .width(50 .dp)
97
+ modifier = Modifier .width(50 .dp),
98
+ textDecoration = if (team != null && match.redAlliance.members.find { member -> member.team.id == team.id } != null ) TextDecoration .Underline else TextDecoration .None
95
99
)
96
100
Spacer (modifier = Modifier .weight(1f ))
97
101
Text (
@@ -100,7 +104,8 @@ fun MatchesView(matchList: List<Match>) {
100
104
fontWeight = FontWeight .Bold ,
101
105
color = allianceBlue,
102
106
textAlign = TextAlign .End ,
103
- modifier = Modifier .width(50 .dp)
107
+ modifier = Modifier .width(50 .dp),
108
+ textDecoration = if (team != null && match.blueAlliance.members.find { member -> member.team.id == team.id } != null ) TextDecoration .Underline else TextDecoration .None
104
109
)
105
110
}
106
111
else {
@@ -126,7 +131,8 @@ fun MatchesView(matchList: List<Match>) {
126
131
Text (
127
132
text = member.team.name,
128
133
fontSize = 15 .sp,
129
- color = allianceBlue
134
+ color = allianceBlue,
135
+ textDecoration = if (team != null && member.team.id == team.id) TextDecoration .Underline else TextDecoration .None
130
136
)
131
137
}
132
138
}
0 commit comments