mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
Added forwarded info in tooltip of sticker.
This commit is contained in:
parent
d7dc277003
commit
89f4408029
3 changed files with 14 additions and 0 deletions
|
@ -3054,6 +3054,13 @@ QString HistoryInner::tooltipText() const {
|
|||
ParseDateTime(forwarded->originalDate).toString(
|
||||
QLocale::system().dateTimeFormat(
|
||||
QLocale::LongFormat)));
|
||||
if (const auto media = view->media()) {
|
||||
if (media->hidesForwardedInfo()) {
|
||||
dateText += "\n" + lng_forwarded(
|
||||
lt_user,
|
||||
forwarded->originalSender->shortName());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (const auto msgsigned = view->data()->Get<HistoryMessageSigned>()) {
|
||||
if (msgsigned->isElided) {
|
||||
|
|
|
@ -201,6 +201,10 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual bool hidesForwardedInfo() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Sometimes webpages can force the bubble to fit their size instead of
|
||||
// allowing message text to be as wide as possible (like wallpapers).
|
||||
[[nodiscard]] virtual bool enforceBubbleWidth() const {
|
||||
|
|
|
@ -45,6 +45,9 @@ public:
|
|||
QString emoji() const {
|
||||
return _emoji;
|
||||
}
|
||||
bool hidesForwardedInfo() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
QSize countOptimalSize() override;
|
||||
|
|
Loading…
Add table
Reference in a new issue