Don't always show timestamps on large custom-emoji-only messages.

This commit is contained in:
John Preston 2022-08-08 13:37:15 +03:00
parent 5c43a541d7
commit cf4b869c27
2 changed files with 5 additions and 3 deletions

View file

@ -292,6 +292,10 @@ void CustomEmoji::paintCustom(
} }
} }
bool CustomEmoji::alwaysShowOutTimestamp() {
return (_lines.size() == 1) && _lines.back().size() > 2;
}
bool CustomEmoji::hasHeavyPart() const { bool CustomEmoji::hasHeavyPart() const {
return _hasHeavyPart; return _hasHeavyPart;
} }

View file

@ -50,9 +50,7 @@ public:
const QRect &r) override; const QRect &r) override;
ClickHandlerPtr link() override; ClickHandlerPtr link() override;
bool alwaysShowOutTimestamp() override { bool alwaysShowOutTimestamp() override;
return true;
}
bool hasTextForCopy() const override { bool hasTextForCopy() const override {
return true; return true;
} }