mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix reaction offset in DM and follow design #2076
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ import io.element.android.libraries.designsystem.theme.messageFromMeBackground
|
|||||||
import io.element.android.libraries.designsystem.theme.messageFromOtherBackground
|
import io.element.android.libraries.designsystem.theme.messageFromOtherBackground
|
||||||
|
|
||||||
private val BUBBLE_RADIUS = 12.dp
|
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.
|
// 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
|
private const val BUBBLE_WIDTH_RATIO = 0.85f
|
||||||
|
|||||||
+10
-1
@@ -345,7 +345,16 @@ private fun TimelineItemEventRowContent(
|
|||||||
linkStartOrEnd(event)
|
linkStartOrEnd(event)
|
||||||
}
|
}
|
||||||
.zIndex(1f)
|
.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
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user