mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Don't display reply preview if it doesn't fit.
This commit is contained in:
parent
3ba210b6e4
commit
7c6bb132ce
1 changed files with 5 additions and 2 deletions
|
@ -495,8 +495,11 @@ void HistoryMessageReply::paint(Painter &p, const HistoryItem *holder, int x, in
|
|||
|
||||
if (w > st::msgReplyBarSkip) {
|
||||
if (replyToMsg) {
|
||||
bool hasPreview = replyToMsg->getMedia() ? replyToMsg->getMedia()->hasReplyPreview() : false;
|
||||
int previewSkip = hasPreview ? (st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x()) : 0;
|
||||
auto hasPreview = replyToMsg->getMedia() ? replyToMsg->getMedia()->hasReplyPreview() : false;
|
||||
if (hasPreview && w < st::msgReplyBarSkip + st::msgReplyBarSize.height()) {
|
||||
hasPreview = false;
|
||||
}
|
||||
auto previewSkip = hasPreview ? (st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x()) : 0;
|
||||
|
||||
if (hasPreview) {
|
||||
ImagePtr replyPreview = replyToMsg->getMedia()->replyPreview();
|
||||
|
|
Loading…
Add table
Reference in a new issue