Fix a memory leak for not cropped media

This commit is contained in:
Thomas 2025-06-05 11:22:50 +02:00
parent 6a74a35efe
commit e051bec7a0
2 changed files with 3 additions and 1 deletions

View file

@ -115,6 +115,7 @@ public class Status implements Serializable, Cloneable {
public List<Reaction> reactions;
public String attachedNotification = null;
public int gifPosition = 0;
public transient boolean isFetchMore = false;
public transient boolean isFetching = false;

View file

@ -3638,7 +3638,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
doubleTapPlayerView.getPlayer().release();
}
}
} else if (holder.binding.mediaContainer.getChildCount() > 0) { //Not cropped views
}
if (holder.binding.mediaContainer.getChildCount() > 0) { //Not cropped views
for(int i = 0 ; i < holder.binding.mediaContainer.getChildCount() ; i++ ) {
PlayerView doubleTapPlayerView = holder.binding.mediaContainer.getChildAt(i).findViewById(R.id.media_video);
if (doubleTapPlayerView != null && doubleTapPlayerView.getPlayer() != null) {