remove unused member

This commit is contained in:
sk 2023-09-09 01:47:46 +02:00
parent 58f0c07357
commit 380e4ff77e
2 changed files with 9 additions and 14 deletions

View file

@ -54,7 +54,7 @@ import me.grishka.appkit.views.UsableRecyclerView;
public abstract class StatusDisplayItem{ public abstract class StatusDisplayItem{
public final String parentID; public final String parentID;
public final BaseStatusListFragment<?> parentFragment; public final BaseStatusListFragment<?> parentFragment;
public boolean inset, insetPadding=true; public boolean inset;
public int index; public int index;
public boolean public boolean
hasDescendantNeighbor = false, hasDescendantNeighbor = false,

View file

@ -74,24 +74,19 @@ public class InsetStatusItemDecoration extends RecyclerView.ItemDecoration{
@Override @Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state){ public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state){
List<StatusDisplayItem> displayItems=listFragment.getDisplayItems(); // List<StatusDisplayItem> displayItems=listFragment.getDisplayItems();
RecyclerView.ViewHolder holder=parent.getChildViewHolder(view); RecyclerView.ViewHolder holder=parent.getChildViewHolder(view);
if(holder instanceof StatusDisplayItem.Holder<?> sdi){ if(holder instanceof StatusDisplayItem.Holder<?> sdi){
boolean inset=sdi.getItem().inset; boolean inset=sdi.getItem().inset;
int pos=holder.getAbsoluteAdapterPosition(); // int pos=holder.getAbsoluteAdapterPosition();
if(inset){ if(inset){
boolean topSiblingInset=pos>0 && displayItems.get(pos-1).inset; // boolean topSiblingInset=pos>0 && displayItems.get(pos-1).inset;
boolean bottomSiblingInset=pos<displayItems.size()-1 && displayItems.get(pos+1).inset; // boolean bottomSiblingInset=pos<displayItems.size()-1 && displayItems.get(pos+1).inset;
int pad;
// if(holder instanceof MediaGridStatusDisplayItem.Holder || holder instanceof LinkCardStatusDisplayItem.Holder) // if(holder instanceof MediaGridStatusDisplayItem.Holder || holder instanceof LinkCardStatusDisplayItem.Holder)
pad=V.dp(16); int pad=V.dp(16);
// else // else pad=V.dp(12);
// pad=V.dp(12); outRect.left=pad;
boolean insetPadding=((StatusDisplayItem.Holder<?>) holder).getItem().insetPadding; outRect.right=pad;
if(insetPadding)
outRect.left=pad;
if(insetPadding)
outRect.right=pad;
// had to comment this out because animations with offsets aren't handled properly. // had to comment this out because animations with offsets aren't handled properly.
// can be worked around by manually applying top margins to items // can be worked around by manually applying top margins to items