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
This commit is contained in:
parent
5ebe60a00d
commit
0065ca64f5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user