1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-19 00:04:56 +00:00

Revert unused changes

This commit is contained in:
Coffeemakr 2017-06-27 14:08:58 +02:00
parent cea706d14a
commit 8009aa975e
2 changed files with 4 additions and 8 deletions

View File

@ -102,9 +102,7 @@ public class MainActivity extends AppCompatActivity {
if (DEBUG) Log.d(TAG, "onBackPressed() called"); if (DEBUG) Log.d(TAG, "onBackPressed() called");
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_holder); Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_holder);
if (fragment instanceof VideoDetailFragment) { if (fragment instanceof VideoDetailFragment) if (((VideoDetailFragment) fragment).onActivityBackPressed()) return;
if (((VideoDetailFragment) fragment).onActivityBackPressed()) return;
}
super.onBackPressed(); super.onBackPressed();

View File

@ -11,7 +11,6 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.InfoItem;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
/** /**
@ -38,7 +37,7 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
private static final String TAG = InfoListAdapter.class.toString(); private static final String TAG = InfoListAdapter.class.toString();
private final InfoItemBuilder infoItemBuilder; private final InfoItemBuilder infoItemBuilder;
private final ArrayList<InfoItem> infoItemList; private final List<InfoItem> infoItemList;
private boolean showFooter = false; private boolean showFooter = false;
private View header = null; private View header = null;
private View footer = null; private View footer = null;
@ -71,11 +70,10 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
infoItemBuilder.setOnChannelInfoItemSelectedListener(listener); infoItemBuilder.setOnChannelInfoItemSelectedListener(listener);
} }
public void addInfoItemList(Collection<InfoItem> data) { public void addInfoItemList(List<InfoItem> data) {
if(data != null) { if(data != null) {
int sizeBefore = infoItemList.size();
infoItemList.addAll(data); infoItemList.addAll(data);
notifyItemRangeInserted(sizeBefore, data.size()); notifyDataSetChanged();
} }
} }