Removed useless code

https://github.com/TeamNewPipe/NewPipe/pull/7659#discussion_r793752985
This commit is contained in:
litetex 2022-01-27 20:41:58 +01:00
parent 01683aa816
commit 9c2cdd2513
1 changed files with 0 additions and 19 deletions

View File

@ -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