mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +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 {
|
||||
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;
|
||||
|
|
|
@ -83,6 +83,9 @@ public:
|
|||
virtual bool hasRightSkip() const {
|
||||
return false;
|
||||
}
|
||||
virtual bool hasSendingAnimation() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
Result *getResult() const;
|
||||
DocumentData *getDocument() const;
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue