mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Fixed skip blocks for web pages and games.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user