Apply several fixes for beta feedback.

* Remove overscroll from avatar picker recyclers.
* Center crop wallpaper previews.
* If no media thumb exists, return bubble projection instead.
This commit is contained in:
Alex Hart
2021-07-23 13:47:43 -03:00
committed by GitHub
parent 2dd8f24e14
commit 740977164b
14 changed files with 138 additions and 103 deletions

View File

@@ -45,7 +45,7 @@ public interface GiphyMp4Playable {
* Width, height, and (x,y) of view which video player will "project" into
* @param viewGroup
*/
@NonNull Projection getProjection(@NonNull ViewGroup viewGroup);
@NonNull Projection getGiphyMp4PlayableProjection(@NonNull ViewGroup viewGroup);
/**
* Specifies whether the content can start playing.

View File

@@ -8,7 +8,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import org.thoughtcrime.securesms.conversation.ConversationItemSwipeCallback;
import org.thoughtcrime.securesms.util.Projection;
import java.util.ArrayList;
@@ -86,7 +85,7 @@ public final class GiphyMp4ProjectionRecycler implements GiphyMp4PlaybackControl
}
private void updateDisplay(@NonNull RecyclerView recyclerView, @NonNull GiphyMp4ProjectionPlayerHolder holder, @NonNull GiphyMp4Playable giphyMp4Playable) {
Projection projection = giphyMp4Playable.getProjection(recyclerView);
Projection projection = giphyMp4Playable.getGiphyMp4PlayableProjection(recyclerView);
holder.getContainer().setX(projection.getX());
holder.getContainer().setY(projection.getY());

View File

@@ -82,7 +82,7 @@ final class GiphyMp4ViewHolder extends RecyclerView.ViewHolder implements GiphyM
}
@Override
public @NonNull Projection getProjection(@NonNull ViewGroup recyclerView) {
public @NonNull Projection getGiphyMp4PlayableProjection(@NonNull ViewGroup recyclerView) {
return Projection.relativeToParent(recyclerView, container, CORNERS);
}