Skip to content

Commit

Permalink
android/tv: remove avatar padding in userView (#606)
Browse files Browse the repository at this point in the history
updates tailscale/corp#26199

Removes the avatar padding when the avatar is not focusable.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
  • Loading branch information
barnstar authored Jan 29, 2025
1 parent 7f93377 commit 817121e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/src/main/java/com/tailscale/ipn/ui/view/Avatar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 817121e

Please sign in to comment.