Skip to content

Commit

Permalink
fix: long team name display
Browse files Browse the repository at this point in the history
  • Loading branch information
croumy committed Oct 20, 2023
1 parent 5e9e0c3 commit c53a47e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.ui.layout.BeyondBoundsLayout
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.LayoutDirection
import androidx.wear.compose.material.Text
import com.croumy.nbawatch.presentation.theme.Dimensions
Expand All @@ -34,7 +35,7 @@ fun TeamItem(
) {
TeamLogo(team = team)
Spacer(Modifier.width(Dimensions.xxsPadding))
Text(text = team.teamName)
Text(text = team.teamName, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fun GameItem(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
TeamItem(team = game.homeTeam)
TeamItem(team = game.homeTeam, modifier = Modifier.weight(1f))
if (game.gameStatusValue == GameStatus.LIVE || game.gameStatusValue == GameStatus.FINISHED) {
Row {
Spacer(Modifier.width(Dimensions.xsPadding))
Expand All @@ -64,7 +64,7 @@ fun GameItem(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
TeamItem(team = game.awayTeam)
TeamItem(team = game.awayTeam, modifier = Modifier.weight(1f))
if (game.gameStatusValue == GameStatus.LIVE || game.gameStatusValue == GameStatus.FINISHED) {
Row {
Spacer(Modifier.width(Dimensions.xsPadding))
Expand Down

0 comments on commit c53a47e

Please sign in to comment.