common: clip avatars to circle shape

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2021-06-04 16:27:20 +05:30
parent 090c3c2017
commit f60d1c7246
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredSize import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.IconButton import androidx.compose.material.IconButton
import androidx.compose.material.IconToggleButton import androidx.compose.material.IconToggleButton
@ -22,6 +23,7 @@ import androidx.compose.material.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.google.accompanist.flowlayout.FlowRow import com.google.accompanist.flowlayout.FlowRow
@ -131,7 +133,7 @@ fun SubmitterAvatar(
KamelImage( KamelImage(
resource = lazyImageResource(avatarUrl), resource = lazyImageResource(avatarUrl),
contentDescription = contentDescription, contentDescription = contentDescription,
modifier = Modifier.requiredSize(24.dp), modifier = Modifier.requiredSize(24.dp).clip(CircleShape),
crossfade = true, crossfade = true,
) )
} }