Skip to content

Commit

Permalink
Fix bad behaviour for long group replies.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal authored and greyson-signal committed Jul 5, 2022
1 parent adbdb97 commit 6aa4706
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Expand Up @@ -38,7 +38,7 @@ public void setPagingController(@Nullable PagingController<Key> pagingController
pagingController.onDataNeededAroundIndex(position);
}

if (position > 0 && position < super.getCurrentList().size()) {
if (position >= 0 && position < super.getCurrentList().size()) {
return super.getItem(position);
} else {
return null;
Expand Down
14 changes: 12 additions & 2 deletions app/src/main/res/layout/stories_group_text_reply_item.xml
Expand Up @@ -41,7 +41,7 @@
android:layout_height="1dp"
app:barrierDirection="start"
app:barrierMargin="-8dp"
app:constraint_referenced_ids="alert_view" />
app:constraint_referenced_ids="alert_view,spacer" />

<androidx.constraintlayout.widget.Barrier
android:id="@+id/viewed_at_end_barrier"
Expand Down Expand Up @@ -159,7 +159,17 @@
app:layout_constraintEnd_toStartOf="@+id/reaction"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@+id/bubble_end_barrier"
tools:visibility="visible" />
tools:visibility="gone" />

<Space
android:id="@+id/spacer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_goneMarginEnd="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/reaction"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@+id/bubble_end_barrier" />

<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction"
Expand Down

0 comments on commit 6aa4706

Please sign in to comment.