Fix multiple chatcolors issues from beta feedback.

- Fix issue where custom color would come out as black
- Completely remove mask view in favour of using the item decoration.
- Fix issue where video gifs wouldn't "cut through" bubble.
- Fix issue where multiselect shade would only appear if bottom or top item was not visible
This commit is contained in:
Alex Hart
2021-09-29 13:38:34 -03:00
committed by Cody Henthorne
parent 705839068a
commit 7e91132e7e
15 changed files with 153 additions and 337 deletions

View File

@@ -39,7 +39,7 @@ public final class GiphyMp4ProjectionRecycler implements GiphyMp4PlaybackControl
for (final GiphyMp4Playable holder : holders) {
if (playbackSet.contains(holder.getAdapterPosition())) {
startPlayback(acquireHolderForPosition(holder.getAdapterPosition()), holder);
startPlayback(recyclerView, acquireHolderForPosition(holder.getAdapterPosition()), holder);
} else {
holder.showProjectionArea();
}
@@ -107,16 +107,22 @@ public final class GiphyMp4ProjectionRecycler implements GiphyMp4PlaybackControl
holder.setCorners(projection.getCorners());
}
private void startPlayback(@NonNull GiphyMp4ProjectionPlayerHolder holder, @NonNull GiphyMp4Playable giphyMp4Playable) {
private void startPlayback(@NonNull RecyclerView parent, @NonNull GiphyMp4ProjectionPlayerHolder holder, @NonNull GiphyMp4Playable giphyMp4Playable) {
if (!Objects.equals(holder.getMediaItem(), giphyMp4Playable.getMediaItem())) {
holder.setOnPlaybackReady(null);
giphyMp4Playable.showProjectionArea();
holder.show();
holder.setOnPlaybackReady(giphyMp4Playable::hideProjectionArea);
holder.setOnPlaybackReady(() -> {
giphyMp4Playable.hideProjectionArea();
parent.invalidateItemDecorations();
});
holder.playContent(giphyMp4Playable.getMediaItem(), giphyMp4Playable.getPlaybackPolicyEnforcer());
} else {
holder.setOnPlaybackReady(giphyMp4Playable::hideProjectionArea);
holder.setOnPlaybackReady(() -> {
giphyMp4Playable.hideProjectionArea();
parent.invalidateItemDecorations();
});
}
}