Fix reaction offset in DM and follow design #2076
This commit is contained in:
parent
fb766f5176
commit
fa600357c4
2 changed files with 11 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ import io.element.android.libraries.designsystem.theme.messageFromMeBackground
|
|||
import io.element.android.libraries.designsystem.theme.messageFromOtherBackground
|
||||
|
||||
private val BUBBLE_RADIUS = 12.dp
|
||||
private val BUBBLE_INCOMING_OFFSET = 16.dp
|
||||
internal val BUBBLE_INCOMING_OFFSET = 16.dp
|
||||
|
||||
// Design says: The maximum width of a bubble is still 3/4 of the screen width. But try with 85% now.
|
||||
private const val BUBBLE_WIDTH_RATIO = 0.85f
|
||||
|
|
|
|||
|
|
@ -345,7 +345,16 @@ private fun TimelineItemEventRowContent(
|
|||
linkStartOrEnd(event)
|
||||
}
|
||||
.zIndex(1f)
|
||||
.padding(start = if (event.isMine) 16.dp else 36.dp, end = 16.dp)
|
||||
.padding(
|
||||
// Note: due to the applied constraints, start is left for other's message and right for mine
|
||||
// In design we want a offset of 6.dp compare to the bubble, so start is 22.dp (16 + 6)
|
||||
start = when {
|
||||
event.isMine -> 22.dp
|
||||
timelineRoomInfo.isDirect -> 22.dp
|
||||
else -> 22.dp + BUBBLE_INCOMING_OFFSET
|
||||
},
|
||||
end = 16.dp
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue