Fix MP4 Gif crash with ConversationUpdateItem

Due to adapter positions changing due to deletes and other such
nonsense, there are cases where update items are all of a sudden in our
playing or notplaying arrays. Checking for playable content before
trying to update positioning information seems to have fixed the issue.
This commit is contained in:
Alex Hart
2021-08-06 16:37:33 -03:00
parent 0762a93787
commit 89af85c893
2 changed files with 12 additions and 5 deletions

View File

@@ -512,7 +512,7 @@ public class ConversationFragment extends LoggingFragment {
private void onViewHolderPositionTranslated(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
if (viewHolder instanceof GiphyMp4Playable) {
giphyMp4ProjectionRecycler.updateDisplay(recyclerView, (GiphyMp4Playable) viewHolder);
giphyMp4ProjectionRecycler.updateVideoDisplayPositionAndSize(recyclerView, (GiphyMp4Playable) viewHolder);
}
if (colorizer != null) {