mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix round video link preview with reactions.
This commit is contained in:
parent
61a9d9c01d
commit
f7ad91e80c
6 changed files with 8 additions and 11 deletions
|
@ -683,6 +683,10 @@ QSize Message::performCountOptimalSize() {
|
|||
std::min(st::msgMaxWidth, reactionsMaxWidth));
|
||||
if (!mediaDisplayed || _viewButton) {
|
||||
minHeight += st::mediaInBubbleSkip;
|
||||
} else if (!media->additionalInfoString().isEmpty()) {
|
||||
// In round videos in a web page status text is painted
|
||||
// in the bottom left corner, reactions should be below.
|
||||
minHeight += st::msgDateFont->height;
|
||||
}
|
||||
if (maxWidth >= reactionsMaxWidth) {
|
||||
minHeight += _reactions->minHeight();
|
||||
|
|
|
@ -624,7 +624,9 @@ void Gif::draw(Painter &p, const PaintContext &context) const {
|
|||
== PaintContext::SkipDrawingParts::Surrounding;
|
||||
|
||||
if (!unwrapped && !skipDrawingSurrounding) {
|
||||
drawCornerStatus(p, context, QPoint());
|
||||
if (!isRound || !inWebPage) {
|
||||
drawCornerStatus(p, context, QPoint());
|
||||
}
|
||||
} else if (!skipDrawingSurrounding) {
|
||||
if (isRound) {
|
||||
const auto mediaUnread = item->hasUnreadMediaFlag();
|
||||
|
|
|
@ -418,13 +418,6 @@ bool ThemeDocument::isReadyForOpen() const {
|
|||
return !_data || _dataMedia->loaded();
|
||||
}
|
||||
|
||||
QString ThemeDocument::additionalInfoString() const {
|
||||
// This will force message info (time) to be displayed below
|
||||
// this attachment in WebPage media.
|
||||
static auto result = QString(" ");
|
||||
return result;
|
||||
}
|
||||
|
||||
bool ThemeDocument::hasHeavyPart() const {
|
||||
return (_dataMedia != nullptr);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
bool isReadyForOpen() const override;
|
||||
QString additionalInfoString() const override;
|
||||
|
||||
bool hasHeavyPart() const override;
|
||||
void unloadHeavyPart() override;
|
||||
|
|
|
@ -710,7 +710,6 @@ TextState WebPage::textState(QPoint point, StateRequest request) const {
|
|||
auto inner = outer.marginsRemoved(innerMargin());
|
||||
auto tshift = inner.top();
|
||||
auto paintw = inner.width();
|
||||
auto attachAdditionalInfoText = _attach ? _attach->additionalInfoString() : QString();
|
||||
|
||||
auto lineHeight = UnitedLineHeight();
|
||||
auto inThumb = false;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 65310f32dcc980aeca0b13253b1278a6f3ce722e
|
||||
Subproject commit 762a611f2009e623d6291ae5564bcd5fa4602e3d
|
Loading…
Add table
Reference in a new issue