Fix bottom text and info layout in albums.

This commit is contained in:
John Preston 2024-08-16 11:16:18 +02:00
parent 62a20ba975
commit 754b3a5ae8
2 changed files with 6 additions and 7 deletions

View file

@ -831,7 +831,7 @@ QSize Message::performCountOptimalSize() {
refreshReactions(); refreshReactions();
} }
refreshRightBadge(); refreshRightBadge();
refreshInfoSkipBlock(); refreshInfoSkipBlock(textItem);
const auto botTop = item->isFakeAboutView() const auto botTop = item->isFakeAboutView()
? Get<FakeBotAboutTop>() ? Get<FakeBotAboutTop>()
@ -4485,17 +4485,16 @@ QSize Message::performCountCurrentSize(int newWidth) {
return { newWidth, newHeight }; return { newWidth, newHeight };
} }
void Message::refreshInfoSkipBlock() { void Message::refreshInfoSkipBlock(HistoryItem *textItem) {
const auto item = data();
const auto media = this->media(); const auto media = this->media();
const auto hasTextSkipBlock = [&] { const auto hasTextSkipBlock = [&] {
if (item->_text.empty()) { if (!textItem || textItem->_text.empty()) {
if (const auto media = data()->media()) { if (const auto media = data()->media()) {
return media->storyExpired(); return media->storyExpired();
} }
return false; return false;
} else if (item->Has<HistoryMessageLogEntryOriginal>() } else if (factcheckBlock()
|| factcheckBlock()) { || data()->Has<HistoryMessageLogEntryOriginal>()) {
return false; return false;
} else if (media && media->isDisplayed() && !_invertMedia) { } else if (media && media->isDisplayed() && !_invertMedia) {
return false; return false;

View file

@ -285,7 +285,7 @@ private:
void ensureRightAction() const; void ensureRightAction() const;
void refreshTopicButton(); void refreshTopicButton();
void refreshInfoSkipBlock(); void refreshInfoSkipBlock(HistoryItem *textItem);
[[nodiscard]] int monospaceMaxWidth() const; [[nodiscard]] int monospaceMaxWidth() const;
void validateInlineKeyboard(HistoryMessageReplyMarkup *markup); void validateInlineKeyboard(HistoryMessageReplyMarkup *markup);