mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-12 16:52:52 +02:00
Fix webpage preview glitch in small bubbles.
This commit is contained in:
parent
3fea28f8b0
commit
b506bf9506
1 changed files with 4 additions and 11 deletions
|
@ -285,9 +285,9 @@ WebPage::WebPage(
|
|||
: st::historyPagePreview)
|
||||
, _data(data)
|
||||
, _flags(flags)
|
||||
, _siteName(st::msgMinWidth - _st.padding.left() - _st.padding.right())
|
||||
, _title(st::msgMinWidth - _st.padding.left() - _st.padding.right())
|
||||
, _description(st::msgMinWidth - _st.padding.left() - _st.padding.right()) {
|
||||
, _siteName(st::minPhotoSize - rect::m::sum::h(_st.padding))
|
||||
, _title(st::minPhotoSize - rect::m::sum::h(_st.padding))
|
||||
, _description(st::minPhotoSize - rect::m::sum::h(_st.padding)) {
|
||||
history()->owner().registerWebPageView(_data, _parent);
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ QSize WebPage::countOptimalSize() {
|
|||
_attach = nullptr;
|
||||
const auto item = _parent->data();
|
||||
_collage = PrepareCollageMedia(item, _data->collage);
|
||||
const auto min = st::msgMinWidth - rect::m::sum::h(_st.padding);
|
||||
const auto min = st::minPhotoSize - rect::m::sum::h(_st.padding);
|
||||
_siteName = Ui::Text::String(min);
|
||||
_title = Ui::Text::String(min);
|
||||
_description = Ui::Text::String(min);
|
||||
|
@ -534,13 +534,6 @@ QSize WebPage::countOptimalSize() {
|
|||
&& !_data->description.text.isEmpty()
|
||||
&& !_data->uniqueGift) {
|
||||
const auto &text = _data->description;
|
||||
|
||||
if (isLogEntryOriginal()) {
|
||||
// Fix layout for small bubbles
|
||||
// (narrow media caption edit log entries).
|
||||
_description = Ui::Text::String(st::minPhotoSize
|
||||
- rect::m::sum::h(padding));
|
||||
}
|
||||
using Type = Core::TextContextDetails::HashtagMentionType;
|
||||
auto context = Core::TextContext({
|
||||
.session = &history()->session(),
|
||||
|
|
Loading…
Add table
Reference in a new issue