mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Prevent usage of hard-coded string for contentDescription, and fix existing issues.
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@ fun RoundedIconAtom(
|
||||
tint = tint,
|
||||
resourceId = resourceId,
|
||||
imageVector = imageVector,
|
||||
contentDescription = "",
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ fun PreferenceIcon(
|
||||
Icon(
|
||||
imageVector = icon,
|
||||
resourceId = iconResourceId,
|
||||
contentDescription = "",
|
||||
contentDescription = null,
|
||||
tint = tintColor ?: enabled.toSecondaryEnabledColor(),
|
||||
modifier = Modifier
|
||||
.padding(end = 16.dp)
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ internal fun FloatingActionButtonPreview() =
|
||||
private fun ContentToPreview() {
|
||||
Box(modifier = Modifier.padding(8.dp)) {
|
||||
FloatingActionButton(onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -145,5 +145,5 @@ internal fun IconImageVectorPreview() =
|
||||
|
||||
@Composable
|
||||
private fun ContentToPreview() {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
|
||||
+4
-4
@@ -67,20 +67,20 @@ private fun ContentToPreview() {
|
||||
CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconPrimary) {
|
||||
Row {
|
||||
IconButton(onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
IconButton(enabled = false, onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconSecondary) {
|
||||
Row {
|
||||
IconButton(onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
IconButton(enabled = false, onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user