mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fixed skip blocks for web pages and games.
This commit is contained in:
parent
d349759618
commit
7aa3956792
2 changed files with 9 additions and 9 deletions
|
@ -74,15 +74,15 @@ QSize Game::countOptimalSize() {
|
|||
auto marked = TextWithEntities { text };
|
||||
auto parseFlags = TextParseLinks | TextParseMultiline;
|
||||
TextUtilities::ParseEntities(marked, parseFlags);
|
||||
_description.setMarkedText(
|
||||
st::webPageDescriptionStyle,
|
||||
marked,
|
||||
Ui::WebpageTextDescriptionOptions());
|
||||
if (!_attach) {
|
||||
_description.updateSkipBlock(
|
||||
_parent->skipBlockWidth(),
|
||||
_parent->skipBlockHeight());
|
||||
}
|
||||
_description.setMarkedText(
|
||||
st::webPageDescriptionStyle,
|
||||
marked,
|
||||
Ui::WebpageTextDescriptionOptions());
|
||||
}
|
||||
}
|
||||
if (_title.isEmpty() && !title.isEmpty()) {
|
||||
|
|
|
@ -201,11 +201,6 @@ QSize WebPage::countOptimalSize() {
|
|||
if (_description.isEmpty() && !_data->description.text.isEmpty()) {
|
||||
auto text = _data->description;
|
||||
|
||||
if (textFloatsAroundInfo) {
|
||||
_description.updateSkipBlock(
|
||||
_parent->skipBlockWidth(),
|
||||
_parent->skipBlockHeight());
|
||||
}
|
||||
if (isLogEntryOriginal()) {
|
||||
// Fix layout for small bubbles (narrow media caption edit log entries).
|
||||
_description = Ui::Text::String(st::minPhotoSize
|
||||
|
@ -225,6 +220,11 @@ QSize WebPage::countOptimalSize() {
|
|||
text,
|
||||
Ui::WebpageTextDescriptionOptions(),
|
||||
context);
|
||||
if (textFloatsAroundInfo) {
|
||||
_description.updateSkipBlock(
|
||||
_parent->skipBlockWidth(),
|
||||
_parent->skipBlockHeight());
|
||||
}
|
||||
}
|
||||
if (!displayedSiteName().isEmpty()) {
|
||||
_siteNameLines = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue