Skip to content

Commit e857bd7

Browse files
committed
Rename val to improve code readability
1 parent 3c3cef0 commit e857bd7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedRoom.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ fun SelectedRoom(
8181
horizontalAlignment = Alignment.CenterHorizontally,
8282
) {
8383
val isRtl = LocalLayoutDirection.current == LayoutDirection.Rtl
84-
val closeRadius = 12.dp.toPx()
85-
val closeOffset = 10.dp.toPx()
84+
val closeIconRadius = 12.dp.toPx()
85+
val closeIconOffset = 10.dp.toPx()
8686
Avatar(
8787
modifier = Modifier
8888
.graphicsLayer {
@@ -91,17 +91,17 @@ fun SelectedRoom(
9191
.drawWithContent {
9292
drawContent()
9393
val xOffset = if (isRtl) {
94-
closeOffset
94+
closeIconOffset
9595
} else {
96-
size.width - closeOffset
96+
size.width - closeIconOffset
9797
}
9898
drawCircle(
9999
color = Color.Black,
100100
center = Offset(
101101
x = xOffset,
102-
y = closeOffset,
102+
y = closeIconOffset,
103103
),
104-
radius = closeRadius,
104+
radius = closeIconRadius,
105105
blendMode = BlendMode.Clear,
106106
)
107107
},

libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedUser.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ fun SelectedUser(
8686
horizontalAlignment = Alignment.CenterHorizontally,
8787
) {
8888
val isRtl = LocalLayoutDirection.current == LayoutDirection.Rtl
89-
val closeRadius = 12.dp.toPx()
90-
val closeOffset = 10.dp.toPx()
89+
val closeIconRadius = 12.dp.toPx()
90+
val closeIconOffset = 10.dp.toPx()
9191
Avatar(
9292
avatarData = matrixUser.getAvatarData(size = AvatarSize.SelectedUser),
9393
avatarType = AvatarType.User,
@@ -99,17 +99,17 @@ fun SelectedUser(
9999
drawContent()
100100
if (canRemove) {
101101
val xOffset = if (isRtl) {
102-
closeOffset
102+
closeIconOffset
103103
} else {
104-
size.width - closeOffset
104+
size.width - closeIconOffset
105105
}
106106
drawCircle(
107107
color = Color.Black,
108108
center = Offset(
109109
x = xOffset,
110-
y = closeOffset,
110+
y = closeIconOffset,
111111
),
112-
radius = closeRadius,
112+
radius = closeIconRadius,
113113
blendMode = BlendMode.Clear,
114114
)
115115
}

0 commit comments

Comments
 (0)