mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix crash in web page preview display.
This commit is contained in:
parent
5655ad25b0
commit
59c38df5cc
2 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ std::map<int, const char*> BetaLogs() {
|
||||||
2001021,
|
2001021,
|
||||||
"- Edit your scheduled messages.\n"
|
"- Edit your scheduled messages.\n"
|
||||||
|
|
||||||
"- See the unread messages indicator for the secondary accounts on the main menu button.\n"
|
"- See the unread messages indicator for your additional accounts on the main menu button.\n"
|
||||||
|
|
||||||
"- Use Auto-Night Mode to make Telegram night mode match the system Dark Mode settings.\n"
|
"- Use Auto-Night Mode to make Telegram night mode match the system Dark Mode settings.\n"
|
||||||
|
|
||||||
|
|
|
@ -70,9 +70,9 @@ bool DrawWebPageDataPreview(Painter &p, not_null<WebPageData*> d, QRect to) {
|
||||||
const auto preview = photo
|
const auto preview = photo
|
||||||
? photo->getReplyPreview(Data::FileOrigin())
|
? photo->getReplyPreview(Data::FileOrigin())
|
||||||
: document->getReplyPreview(Data::FileOrigin());
|
: document->getReplyPreview(Data::FileOrigin());
|
||||||
const auto w = preview->width();
|
|
||||||
const auto h = preview->height();
|
|
||||||
if (preview) {
|
if (preview) {
|
||||||
|
const auto w = preview->width();
|
||||||
|
const auto h = preview->height();
|
||||||
if (w == h) {
|
if (w == h) {
|
||||||
p.drawPixmap(to.x(), to.y(), preview->pix());
|
p.drawPixmap(to.x(), to.y(), preview->pix());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue