mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-25 10:01:00 +00:00
Fix switching profiles in a channel.
This commit is contained in:
parent
a4ac00acbd
commit
3a7a485dd0
@ -4232,13 +4232,28 @@ int Message::resizeContentGetHeight(int newWidth) {
|
|||||||
return height();
|
return height();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto item = data();
|
||||||
|
const auto postShowingAuthor = item->isPostShowingAuthor() ? 1 : 0;
|
||||||
|
if (_postShowingAuthor != postShowingAuthor) {
|
||||||
|
_postShowingAuthor = postShowingAuthor;
|
||||||
|
_fromNameVersion = -1;
|
||||||
|
previousInBlocksChanged();
|
||||||
|
|
||||||
|
const auto size = _bottomInfo.currentSize();
|
||||||
|
_bottomInfo.update(BottomInfoDataFromMessage(this), newWidth);
|
||||||
|
if (size != _bottomInfo.currentSize()) {
|
||||||
|
// maxWidth may have changed, full recount required.
|
||||||
|
setPendingResize();
|
||||||
|
return resizeGetHeight(newWidth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto newHeight = minHeight();
|
auto newHeight = minHeight();
|
||||||
|
|
||||||
if (const auto service = Get<ServicePreMessage>()) {
|
if (const auto service = Get<ServicePreMessage>()) {
|
||||||
service->resizeToWidth(newWidth, delegate()->elementIsChatWide());
|
service->resizeToWidth(newWidth, delegate()->elementIsChatWide());
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto item = data();
|
|
||||||
const auto botTop = item->isFakeAboutView()
|
const auto botTop = item->isFakeAboutView()
|
||||||
? Get<FakeBotAboutTop>()
|
? Get<FakeBotAboutTop>()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
@ -4246,14 +4261,6 @@ int Message::resizeContentGetHeight(int newWidth) {
|
|||||||
const auto mediaDisplayed = media ? media->isDisplayed() : false;
|
const auto mediaDisplayed = media ? media->isDisplayed() : false;
|
||||||
const auto bubble = drawBubble();
|
const auto bubble = drawBubble();
|
||||||
|
|
||||||
const auto postShowingAuthor = item->isPostShowingAuthor() ? 1 : 0;
|
|
||||||
if (_postShowingAuthor != postShowingAuthor) {
|
|
||||||
_postShowingAuthor = postShowingAuthor;
|
|
||||||
_bottomInfo.update(BottomInfoDataFromMessage(this), newWidth);
|
|
||||||
_fromNameVersion = -1;
|
|
||||||
previousInBlocksChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
item->resolveDependent();
|
item->resolveDependent();
|
||||||
|
|
||||||
// This code duplicates countGeometry() but also resizes media.
|
// This code duplicates countGeometry() but also resizes media.
|
||||||
|
Loading…
Reference in New Issue
Block a user