Fix pull to refresh for the cards view

filtering
Floens 10 years ago
parent 653e2cfe08
commit 2446f44ade
  1. 28
      Clover/app/src/main/java/org/floens/chan/ui/layout/ThreadListLayout.java

@ -264,21 +264,19 @@ public class ThreadListLayout extends LinearLayout implements ReplyLayout.ReplyL
return true; return true;
} }
View top = recyclerView.getChildAt(0); switch (postViewMode) {
if (top != null) { case LIST:
if (((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition() == 0) {
switch (postViewMode) { View top = layoutManager.findViewByPosition(0);
case LIST: return top.getTop() != 0;
if (top.getTop() == 0 && ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition() == 0) { }
return false; break;
} case CARD:
break; if (((GridLayoutManager) layoutManager).findFirstVisibleItemPosition() == 0) {
case CARD: View top = layoutManager.findViewByPosition(0);
if (top.getTop() == 0 && ((GridLayoutManager) layoutManager).findFirstVisibleItemPosition() == 0) { return top.getTop() != dp(8); // 4dp for the cards, 4dp for this layout
return false; }
} break;
break;
}
} }
return true; return true;
} }

Loading…
Cancel
Save