mirror of
https://github.com/DrKLO/Telegram.git
synced 2025-03-14 11:44:00 +01:00
Fix width of the reactions container when long clicking on the media message
This commit is contained in:
parent
7c62a5da96
commit
410a333539
1 changed files with 16 additions and 12 deletions
|
@ -336,19 +336,23 @@ public class ChatSelectionReactionMenuOverlay extends FrameLayout {
|
|||
|
||||
private void animateVisible(boolean visible) {
|
||||
if (visible) {
|
||||
currentPrimaryObject = findPrimaryObject();
|
||||
checkCreateReactionsLayout();
|
||||
invalidatePosition(false);
|
||||
|
||||
setVisibility(VISIBLE);
|
||||
if (reactionsContainerLayout.isEnabled()) {
|
||||
messageSet = true;
|
||||
reactionsContainerLayout.setMessage(currentPrimaryObject, parentFragment.getCurrentChatInfo());
|
||||
reactionsContainerLayout.startEnterAnimation(false);
|
||||
} else {
|
||||
messageSet = false;
|
||||
reactionsContainerLayout.setTransitionProgress(1f);
|
||||
}
|
||||
|
||||
// The width of the current view must be calculated before creating [reactionsContainerLayout]
|
||||
post(() -> {
|
||||
currentPrimaryObject = findPrimaryObject();
|
||||
checkCreateReactionsLayout();
|
||||
invalidatePosition(false);
|
||||
|
||||
if (reactionsContainerLayout.isEnabled()) {
|
||||
messageSet = true;
|
||||
reactionsContainerLayout.setMessage(currentPrimaryObject, parentFragment.getCurrentChatInfo());
|
||||
reactionsContainerLayout.startEnterAnimation(false);
|
||||
} else {
|
||||
messageSet = false;
|
||||
reactionsContainerLayout.setTransitionProgress(1f);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
messageSet = false;
|
||||
ValueAnimator animator = ValueAnimator.ofFloat(1, 0).setDuration(150);
|
||||
|
|
Loading…
Add table
Reference in a new issue