fix: fix crashes on PreviewlessMediaGridStatusDisplayItem

This commit is contained in:
LucasGGamerM 2023-09-16 16:22:00 -03:00
parent 31a7aa9d40
commit 51ef732d50
1 changed files with 1 additions and 3 deletions

View File

@ -138,9 +138,7 @@ public class PreviewlessMediaGridStatusDisplayItem extends StatusDisplayItem{
default -> throw new IllegalStateException("Unexpected value: "+att.type);
});
if(c.view.getLayoutParams()==null)
c.view.setLayoutParams(new PreviewlessMediaGridLayout.LayoutParams(item.tiledLayout.tiles[i]));
else
((MediaGridLayout.LayoutParams) c.view.getLayoutParams()).tile=item.tiledLayout.tiles[i];
c.view.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
layout.addView(c.view);
c.view.setOnClickListener(clickListener);
c.view.setTag(i);