mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Display thread header in CFv2.
This commit is contained in:
committed by
Greyson Parrelli
parent
ffbbdc1576
commit
3ba128793a
@@ -4,6 +4,7 @@ import android.graphics.Canvas
|
||||
import androidx.core.view.children
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.thoughtcrime.securesms.conversation.ConversationAdapter
|
||||
import org.thoughtcrime.securesms.conversation.v2.ConversationAdapterV2
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
@@ -28,7 +29,7 @@ class GiphyMp4ItemDecoration(
|
||||
} else {
|
||||
val footerViewHolder = parent.children
|
||||
.map { parent.getChildViewHolder(it) }
|
||||
.filterIsInstance(ConversationAdapter.FooterViewHolder::class.java)
|
||||
.filter { it is ConversationAdapter.FooterViewHolder || it is ConversationAdapterV2.ThreadHeaderViewHolder }
|
||||
.firstOrNull()
|
||||
|
||||
if (footerViewHolder == null) {
|
||||
|
||||
@@ -66,7 +66,7 @@ final class GiphyMp4PagedDataSource implements PagedDataSource<String, GiphyImag
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull List<GiphyImage> load(int start, int length, @NonNull CancellationSignal cancellationSignal) {
|
||||
public @NonNull List<GiphyImage> load(int start, int length, int totalSize, @NonNull CancellationSignal cancellationSignal) {
|
||||
try {
|
||||
Log.d(TAG, "Loading from " + start + " to " + (start + length));
|
||||
return new LinkedList<>(performFetch(start, length).getData());
|
||||
|
||||
Reference in New Issue
Block a user