From 9c2cdd251390fab9e4949befe306fd4c7b589a2b Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Thu, 27 Jan 2022 20:41:58 +0100 Subject: [PATCH] Removed useless code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit → https://github.com/TeamNewPipe/NewPipe/pull/7659#discussion_r793752985 --- .../newpipe/info_list/InfoListAdapter.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java index 718f7004c..fb27593e7 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java @@ -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 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