Skip to content

Commit 817121e

Browse files
authored
android/tv: remove avatar padding in userView (#606)
updates tailscale/corp#26199 Removes the avatar padding when the avatar is not focusable. Signed-off-by: Jonathan Nobels <[email protected]>
1 parent 7f93377 commit 817121e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

android/src/main/java/com/tailscale/ipn/ui/view/Avatar.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fun Avatar(
5151
modifier =
5252
Modifier.conditional(AndroidTVUtil.isAndroidTV(), { padding(4.dp) })
5353
.conditional(
54-
AndroidTVUtil.isAndroidTV(),
54+
AndroidTVUtil.isAndroidTV() && isFocusable,
5555
{
5656
size((size * 1.5f).dp) // Focusable area is larger than the avatar
5757
})

android/src/main/java/com/tailscale/ipn/ui/view/UserView.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fun UserView(
5252
ListItem(
5353
modifier = modifier,
5454
colors = colors,
55-
leadingContent = { Avatar(profile = profile, size = 36) },
55+
leadingContent = { Avatar(profile = profile, size = 36, isFocusable = false) },
5656
headlineContent = {
5757
AutoResizingText(
5858
text = profile.UserProfile.LoginName,

0 commit comments

Comments
 (0)