Commit e051bec7 authored by Thomas's avatar Thomas
Browse files

Fix a memory leak for not cropped media

parent 6a74a35e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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) {