Browse Source

Returned FeedAdapterV2 to its original code

renovate/org.robolectric-robolectric-4.x
zerrium 4 years ago
parent
commit
12a669ee3a
  1. 9
      app/src/main/java/awais/instagrabber/adapters/FeedAdapterV2.java

9
app/src/main/java/awais/instagrabber/adapters/FeedAdapterV2.java

@ -154,15 +154,6 @@ public final class FeedAdapterV2 extends ListAdapter<Media, RecyclerView.ViewHol
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, final int position) { public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, final int position) {
final Media feedModel = getItem(position); final Media feedModel = getItem(position);
if (feedModel == null) return; if (feedModel == null) return;
//Turn a junk (sponsored) instagram post from people we following into a blank post, I need help to improve this part
String c = feedModel.getCaption().getText();
if(FilterKeywords.filter(c)){
Log.d(TAG, "Filtered:\n" + c + "\n");
return;
}
//Zerrium (18 Mar 2021)
switch (layoutPreferences.getType()) { switch (layoutPreferences.getType()) {
case LINEAR: case LINEAR:
((FeedItemViewHolder) viewHolder).bind(feedModel); ((FeedItemViewHolder) viewHolder).bind(feedModel);

Loading…
Cancel
Save