Commit 0065ca64 authored by DrKLO's avatar DrKLO

Hide emoji popup by pressing text message area, fixed that some links were untouchable

https://github.com/DrKLO/Telegram/pull/272
https://github.com/DrKLO/Telegram/issues/392
parent 5ebe60a0
......@@ -40,8 +40,8 @@ public class ChatMessageCell extends ChatBaseCell {
int x = (int)event.getX();
int y = (int)event.getY();
if (x >= textX && y >= textY && x <= textX + currentMessageObject.textWidth && y <= textY + currentMessageObject.textHeight) {
y -= textY;
int blockNum = Math.max(0, y / currentMessageObject.blockHeight);
y -= textY;
if (blockNum < currentMessageObject.textLayoutBlocks.size()) {
MessageObject.TextLayoutBlock block = currentMessageObject.textLayoutBlocks.get(blockNum);
x -= textX - (int)Math.ceil(block.textXOffset);
......
......@@ -753,6 +753,15 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
}
});
messsageEditText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (emojiPopup != null && emojiPopup.isShowing()) {
showEmojiPopup(false);
}
}
});
messsageEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment