Fix fast share button hover area.

This commit is contained in:
John Preston 2018-02-18 16:22:58 +03:00
parent 49d2c97ceb
commit ddab8c1473
1 changed files with 16 additions and 13 deletions

View File

@ -716,6 +716,7 @@ TextState Message::textState(
}
if (drawBubble()) {
const auto inBubble = g.contains(point);
auto entry = logEntryOriginal();
auto mediaDisplayed = media && media->isDisplayed();
@ -729,7 +730,7 @@ TextState Message::textState(
}
if (mediaOnTop) {
trect.setY(trect.y() - st::msgPadding.top());
} else {
} else if (inBubble) {
if (getStateFromName(point, trect, &result)) {
return result;
}
@ -769,6 +770,7 @@ TextState Message::textState(
result.cursor = CursorState::Date;
}
};
if (inBubble) {
if (mediaDisplayed) {
auto mediaHeight = media->height();
auto mediaLeft = trect.x() - st::msgPadding.left();
@ -789,6 +791,7 @@ TextState Message::textState(
} else if (point.y() >= trect.y() + trect.height()) {
result.symbol = item->_text.length();
}
}
checkForPointInTime();
if (displayRightAction()) {
const auto fastShareSkip = snap(