gt:         if (isEmpty && outButtons.isEmpty()) {
context: package org.telegram.ui.Components.Reactions;
  
  import android.graphics.Canvas;
  import android.graphics.Color;
  import android.graphics.Paint;
  import android.text.TextPaint;
  import android.view.Gravity;
  import android.view.MotionEvent;
  import android.view.ViewConfiguration;
  
  import androidx.core.graphics.ColorUtils;
  import androidx.recyclerview.widget.ChatListItemAnimator;
  
  import org.telegram.messenger.AndroidUtilities;
  import org.telegram.messenger.ApplicationLoader;
  import org.telegram.messenger.DocumentObject;
  import org.telegram.messenger.ImageLocation;
  import org.telegram.messenger.ImageReceiver;
  import org.telegram.messenger.MediaDataController;
  import org.telegram.messenger.MessageObject;
  import org.telegram.messenger.MessagesController;
  import org.telegram.messenger.SvgHelper;
  import org.telegram.messenger.UserConfig;
  import org.telegram.tgnet.TLRPC;
  import org.telegram.ui.ActionBar.Theme;
  import org.telegram.ui.Cells.ChatMessageCell;
  import org.telegram.ui.Components.AvatarsDarawable;
  import org.telegram.ui.Components.CounterView;
  
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.Comparator;
  import java.util.HashMap;
  
  public class ReactionsLayoutInBubble {
  
      private final static int ANIMATION_TYPE_IN = 1;
      private final static int ANIMATION_TYPE_OUT = 2;
      private final static int ANIMATION_TYPE_MOVE = 3;
      public boolean drawServiceShaderBackground;
  
      private static Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
      private static TextPaint textPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
      public boolean isSmall;
  
      public int x;
      public int y;
      private float fromX;
      private float fromY;
      private float lastDrawnX;
      private float lastDrawnY;
      private boolean wasDrawn;
      private boolean animateMove;
      private boolean animateWidth;
      private boolean animateHeight;
      public int positionOffsetY;
      int currentAccount;
      public int height;
      public int totalHeight;
      public int width;
      public int fromWidth;
      public boolean isEmpty;
      private float touchSlop;
      public int lastLineX;
      ArrayList<ReactionButton> reactionButtons = new ArrayList<>();
      ArrayList<ReactionButton> outButtons = new ArrayList<>();
      HashMap<String, ReactionButton> lastDrawingReactionButtons = new HashMap<>();
      HashMap<String, ReactionButton> lastDrawingReactionButtonsTmp = new HashMap<>();
      ChatMessageCell parentView;
      MessageObject messageObject;
      Theme.ResourcesProvider resourcesProvider;
      private String scrimViewReaction;
  
      int availableWidth;
      private int lastDrawnWidth;
      boolean attached;
      private static int animationUniq;
  
      private final static ButtonsComparator comparator = new ButtonsComparator();
      HashMap<String, ImageReceiver> animatedReactions = new HashMap<>();
      private int lastDrawTotalHeight;
      private int animateFromTotalHeight;
      public boolean hasUnreadReactions;
  
      public ReactionsLayoutInBubble(ChatMessageCell parentView) {
          this.parentView = parentView;
          currentAccount = UserConfig.selectedAccount;
          paint.setColor(Theme.getColor(Theme.key_chat_inLoader));
          textPaint.setColor(Theme.getColor(Theme.key_featuredStickers_buttonText));
          textPaint.setTextSize(AndroidUtilities.dp(12));
          textPaint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
          touchSlop = ViewConfiguration.get(ApplicationLoader.applicationContext).getScaledTouchSlop();
      }
  
      public void setMessage(MessageObject messageObject, boolean isSmall, Theme.ResourcesProvider resourcesProvider) {
          this.resourcesProvider = resourcesProvider;
          this.isSmall = isSmall;
          this.messageObject = messageObject;
          for (int i = 0; i < reactionButtons.size(); i++) {
              reactionButtons.get(i).detach();
          }
          hasUnreadReactions = false;
          reactionButtons.clear();
          if (messageObject != null) {
              if (messageObject.messageOwner.reactions != null && messageObject.messageOwner.reactions.results != null) {
                  int totalCount = 0;
                  for (int i = 0; i < messageObject.messageOwner.reactions.results.size(); i++) {
                      totalCount += messageObject.messageOwner.reactions.results.get(i).count;
                  }
                  for (int i = 0; i < messageObject.messageOwner.reactions.results.size(); i++) {
                      TLRPC.TL_reactionCount reactionCount = messageObject.messageOwner.reactions.results.get(i);
                      ReactionButton button = new ReactionButton(reactionCount);
                      reactionButtons.add(button);
                      if (!isSmall && messageObject.messageOwner.reactions.recent_reactions != null) {
                          ArrayList<TLRPC.User> users = null;
                          if (reactionCount.count <= 3 && totalCount <= 3) {
                              for (int j = 0; j < messageObject.messageOwner.reactions.recent_reactions.size(); j++) {
                                  TLRPC.TL_messagePeerReaction reccent = messageObject.messageOwner.reactions.recent_reactions.get(j);
                                  if (reccent.reaction.equals(reactionCount.reaction) && MessagesController.getInstance(currentAccount).getUser(MessageObject.getPeerId(reccent.peer_id)) != null) {
                                      if (users == null) {
                                          users = new ArrayList<>();
                                      }
                                      users.add(MessagesController.getInstance(currentAccount).getUser(MessageObject.getPeerId(reccent.peer_id)));
                                  }
                              }
                              button.setUsers(users);
                              if (users != null && !users.isEmpty()) {
                                  button.count = 0;
                                  button.counterDrawable.setCount(0, false);
                              }
                          }
                      }
                      if (isSmall && reactionCount.count > 1 && reactionCount.chosen) {
                          reactionButtons.add(new ReactionButton(reactionCount));
                          reactionButtons.get(0).isSelected = false;
                          reactionButtons.get(1).isSelected = true;
                          reactionButtons.get(0).realCount = 1;
                          reactionButtons.get(1).realCount = 1;
                          reactionButtons.get(1).key = reactionButtons.get(1).key + "_";
                          break;
                      }
                      if (isSmall && i == 2) {
                          break;
                      }
                      if (attached) {
                          button.attach();
                      }
                  }
              }
              if (!isSmall) {
                  comparator.currentAccount = currentAccount;
                  Collections.sort(reactionButtons, comparator);
              }
              hasUnreadReactions = MessageObject.hasUnreadReactions(messageObject.messageOwner);
          }
          isEmpty = reactionButtons.isEmpty();
      }
  
      public void measure(int availableWidth) {
          height = 0;
          width = 0;
          positionOffsetY = 0;
          totalHeight = 0;
          if (isEmpty) {
              return;
          }
          this.availableWidth = availableWidth;
          int maxWidth = 0;
          int currentX = 0;
          int currentY = 0;
          for (int i = 0; i < reactionButtons.size(); i++) {
              ReactionButton button = reactionButtons.get(i);
              if (isSmall) {
                  button.width = AndroidUtilities.dp(14);
                  button.height = AndroidUtilities.dp(14);
              } else {
                  button.width = (int) (AndroidUtilities.dp(8) + AndroidUtilities.dp(20) + AndroidUtilities.dp(4));
                  if (button.avatarsDarawable != null && button.users.size() > 0) {
                      button.users.size();
                      int c1 = 1;
                      int c2 = button.users.size() > 1 ? button.users.size() - 1 : 0;
                      button.width += AndroidUtilities.dp(2) + c1 * AndroidUtilities.dp(20) + c2 * AndroidUtilities.dp(20) * 0.8f + AndroidUtilities.dp(1);
                      button.avatarsDarawable.height = AndroidUtilities.dp(26);
                  } else {
                      button.width += button.counterDrawable.textPaint.measureText(button.countText) + AndroidUtilities.dp(8);
                  }
                  button.height = AndroidUtilities.dp(26);
              }
  
              if (currentX + button.width > availableWidth) {
                  currentX = 0;
                  currentY += button.height + AndroidUtilities.dp(4);
              }
              button.x = currentX;
              button.y = currentY;
              currentX += button.width + AndroidUtilities.dp(4);
              if (currentX > maxWidth) {
                  maxWidth = currentX;
              }
  
          }
          lastLineX = currentX;
          width = maxWidth;
          height = currentY + (reactionButtons.size() == 0 ? 0 : AndroidUtilities.dp(26));
          drawServiceShaderBackground = false;
      }
  
      public void draw(Canvas canvas, float animationProgress, String drawOnlyReaction) {
  