Skip to content

Commit

Permalink
Increase expanded read receipts back to 5
Browse files Browse the repository at this point in the history
Change-Id: I41833c23f345688bd17b2c70cbc1390d1ec8e95b
  • Loading branch information
SpiritCroc committed Jul 10, 2022
1 parent c703d29 commit 95c4b68
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.home.room.detail.timeline.item.ReadReceiptData
import im.vector.app.features.home.room.detail.timeline.item.toMatrixItem

private const val MAX_RECEIPT_DISPLAYED = 3
private const val MAX_RECEIPT_DISPLAYED = 5

class ReadReceiptsView @JvmOverloads constructor(
context: Context,
Expand All @@ -44,7 +44,13 @@ class ReadReceiptsView @JvmOverloads constructor(
}

private val receiptAvatars: List<ImageView> by lazy {
listOf(views.receiptAvatar1, views.receiptAvatar2, views.receiptAvatar3)
listOf(
views.receiptAvatar1,
views.receiptAvatar2,
views.receiptAvatar3,
views.receiptAvatar4,
views.receiptAvatar5
)
}

private fun setupView() {
Expand Down
26 changes: 25 additions & 1 deletion vector/src/main/res/layout/view_read_receipts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- Wrong indention for upstream merges -->

<ImageView
android:id="@+id/receiptAvatar3"
android:id="@+id/receiptAvatar5"
android:layout_width="@dimen/item_event_message_state_size"
android:layout_height="@dimen/item_event_message_state_size"
android:layout_marginStart="2dp"
Expand All @@ -40,6 +40,30 @@
tools:ignore="NegativeMargin"
tools:src="@sample/user_round_avatars" />

<ImageView
android:id="@+id/receiptAvatar4"
android:layout_width="@dimen/item_event_message_state_size"
android:layout_height="@dimen/item_event_message_state_size"
android:layout_marginEnd="-6dp"
android:adjustViewBounds="true"
android:importantForAccessibility="no"
android:padding="1dp"
android:scaleType="centerCrop"
tools:ignore="NegativeMargin"
tools:src="@sample/user_round_avatars" />

<ImageView
android:id="@+id/receiptAvatar3"
android:layout_width="@dimen/item_event_message_state_size"
android:layout_height="@dimen/item_event_message_state_size"
android:layout_marginEnd="-6dp"
android:adjustViewBounds="true"
android:importantForAccessibility="no"
android:padding="1dp"
android:scaleType="centerCrop"
tools:ignore="NegativeMargin"
tools:src="@sample/user_round_avatars" />

<ImageView
android:id="@+id/receiptAvatar2"
android:layout_width="@dimen/item_event_message_state_size"
Expand Down

0 comments on commit 95c4b68

Please sign in to comment.