android/tv: remove avatar padding in userView

updates tailscale/corp#26199

Removes the avatar padding when the avatar is not focusable.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
pull/606/head
Jonathan Nobels 10 months ago
parent 7f93377c2f
commit f12abd3d41

@ -51,7 +51,7 @@ fun Avatar(
modifier =
Modifier.conditional(AndroidTVUtil.isAndroidTV(), { padding(4.dp) })
.conditional(
AndroidTVUtil.isAndroidTV(),
AndroidTVUtil.isAndroidTV() && isFocusable,
{
size((size * 1.5f).dp) // Focusable area is larger than the avatar
})

@ -52,7 +52,7 @@ fun UserView(
ListItem(
modifier = modifier,
colors = colors,
leadingContent = { Avatar(profile = profile, size = 36) },
leadingContent = { Avatar(profile = profile, size = 36, isFocusable = false) },
headlineContent = {
AutoResizingText(
text = profile.UserProfile.LoginName,

Loading…
Cancel
Save