mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-23 02:35:21 +01:00
Removed useless code
→ https://github.com/TeamNewPipe/NewPipe/pull/7659#discussion_r793752985
This commit is contained in:
parent
01683aa816
commit
9c2cdd2513
@ -11,7 +11,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import org.schabi.newpipe.database.stream.model.StreamStateEntity;
|
||||
import org.schabi.newpipe.databinding.PignateFooterBinding;
|
||||
import org.schabi.newpipe.extractor.InfoItem;
|
||||
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
|
||||
@ -311,24 +310,6 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder,
|
||||
final int position,
|
||||
@NonNull final List<Object> payloads) {
|
||||
// an empty payload requires a full update (see RecyclerView javadoc)
|
||||
if (payloads.isEmpty() || !(holder instanceof InfoItemHolder)) {
|
||||
onBindViewHolder(holder, position);
|
||||
return;
|
||||
}
|
||||
|
||||
for (final Object payload : payloads) {
|
||||
if (payload instanceof StreamStateEntity || payload instanceof Boolean) {
|
||||
((InfoItemHolder) holder).updateState(
|
||||
infoItemList.get(hasHeader() ? position - 1 : position), recordManager);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GridLayoutManager.SpanSizeLookup getSpanSizeLookup(final int spanCount) {
|
||||
return new GridLayoutManager.SpanSizeLookup() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user