mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Simplified condition to provide sending animation from inline results.
This commit is contained in:
parent
3cb595c3c9
commit
0529aea194
3 changed files with 10 additions and 4 deletions
|
@ -73,6 +73,9 @@ public:
|
||||||
bool hasRightSkip() const override {
|
bool hasRightSkip() const override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool hasSendingAnimation() const override {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void paint(Painter &p, const QRect &clip, const PaintContext *context) const override;
|
void paint(Painter &p, const QRect &clip, const PaintContext *context) const override;
|
||||||
TextState getState(
|
TextState getState(
|
||||||
|
@ -191,6 +194,9 @@ public:
|
||||||
bool hasRightSkip() const override {
|
bool hasRightSkip() const override {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
bool hasSendingAnimation() const override {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
void preload() const override;
|
void preload() const override;
|
||||||
|
|
||||||
void paint(Painter &p, const QRect &clip, const PaintContext *context) const override;
|
void paint(Painter &p, const QRect &clip, const PaintContext *context) const override;
|
||||||
|
|
|
@ -83,6 +83,9 @@ public:
|
||||||
virtual bool hasRightSkip() const {
|
virtual bool hasRightSkip() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
virtual bool hasSendingAnimation() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Result *getResult() const;
|
Result *getResult() const;
|
||||||
DocumentData *getDocument() const;
|
DocumentData *getDocument() const;
|
||||||
|
|
|
@ -270,10 +270,7 @@ void Inner::selectInlineResult(
|
||||||
const auto document = item->getDocument()
|
const auto document = item->getDocument()
|
||||||
? item->getDocument()
|
? item->getDocument()
|
||||||
: item->getPreviewDocument();
|
: item->getPreviewDocument();
|
||||||
if (options.scheduled
|
if (options.scheduled || !item->hasSendingAnimation()) {
|
||||||
|| item->isFullLine()
|
|
||||||
|| !document
|
|
||||||
|| (!document->sticker() && !document->isGifv())) {
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
const auto rect = item->innerContentRect().translated(
|
const auto rect = item->innerContentRect().translated(
|
||||||
|
|
Loading…
Add table
Reference in a new issue