Simplified condition to provide sending animation from inline results.

This commit is contained in:
23rd 2022-03-14 11:57:04 +03:00
parent 3cb595c3c9
commit 0529aea194
3 changed files with 10 additions and 4 deletions

View file

@ -73,6 +73,9 @@ public:
bool hasRightSkip() const override {
return true;
}
bool hasSendingAnimation() const override {
return true;
}
void paint(Painter &p, const QRect &clip, const PaintContext *context) const override;
TextState getState(
@ -191,6 +194,9 @@ public:
bool hasRightSkip() const override {
return false;
}
bool hasSendingAnimation() const override {
return true;
}
void preload() const override;
void paint(Painter &p, const QRect &clip, const PaintContext *context) const override;

View file

@ -83,6 +83,9 @@ public:
virtual bool hasRightSkip() const {
return false;
}
virtual bool hasSendingAnimation() const {
return false;
}
Result *getResult() const;
DocumentData *getDocument() const;

View file

@ -270,10 +270,7 @@ void Inner::selectInlineResult(
const auto document = item->getDocument()
? item->getDocument()
: item->getPreviewDocument();
if (options.scheduled
|| item->isFullLine()
|| !document
|| (!document->sticker() && !document->isGifv())) {
if (options.scheduled || !item->hasSendingAnimation()) {
return {};
}
const auto rect = item->innerContentRect().translated(