Skip to content

Commit

Permalink
fix: Change default color of AccountRow() to LocalContentColor.current
Browse files Browse the repository at this point in the history
Change-Id: If1fc637d66180ed43645c2ca09fe32ee8082a87d
  • Loading branch information
XayahSuSuSu committed Dec 1, 2023
1 parent d7bb0a7 commit cd8cd63
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.compose.material.icons.rounded.CloudCircle
import androidx.compose.material.icons.rounded.MoreVert
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.LocalContentColor
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -106,7 +107,7 @@ fun AccountCardShimmer(modifier: Modifier = Modifier) {
}

@Composable
fun AccountRow(shimmering: Boolean, icon: ImageVectorToken, text: StringResourceToken, color: Color = Color.Unspecified) {
fun AccountRow(shimmering: Boolean, icon: ImageVectorToken, text: StringResourceToken, color: Color = LocalContentColor.current) {
Row(horizontalArrangement = Arrangement.spacedBy(PaddingTokens.Level1), verticalAlignment = Alignment.CenterVertically) {
Icon(
imageVector = icon.value,
Expand Down Expand Up @@ -170,7 +171,7 @@ fun AccountCard(
text = StringResourceToken.fromString(user)
)

val remoteRowColor = if (remote.isEmpty()) ColorSchemeKeyTokens.Error.toColor() else Color.Unspecified
val remoteRowColor = if (remote.isEmpty()) ColorSchemeKeyTokens.Error.toColor() else LocalContentColor.current
val remoteRowText = remote.ifEmpty { stringResource(id = R.string.remote_not_set) }
AccountRow(
shimmering = shimmering,
Expand Down

0 comments on commit cd8cd63

Please sign in to comment.