mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Allow service messages to be unread mentions.
This commit is contained in:
@@ -658,6 +658,15 @@ void HistoryItem::finishEditionToEmpty() {
|
||||
}
|
||||
}
|
||||
|
||||
void HistoryItem::markMediaRead() {
|
||||
_flags &= ~MTPDmessage::Flag::f_media_unread;
|
||||
|
||||
if (mentionsMe()) {
|
||||
history()->updateChatListEntry();
|
||||
history()->eraseFromUnreadMentions(id);
|
||||
}
|
||||
}
|
||||
|
||||
void HistoryItem::clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) {
|
||||
if (auto markup = Get<HistoryMessageReplyMarkup>()) {
|
||||
if (markup->inlineKeyboard) {
|
||||
|
@@ -577,10 +577,7 @@ public:
|
||||
bool isMediaUnread() const {
|
||||
return _flags & MTPDmessage::Flag::f_media_unread;
|
||||
}
|
||||
void markMediaRead() {
|
||||
_flags &= ~MTPDmessage::Flag::f_media_unread;
|
||||
markMediaAsReadHook();
|
||||
}
|
||||
void markMediaRead();
|
||||
|
||||
// Zero result means this message is not self-destructing right now.
|
||||
virtual TimeMs getSelfDestructIn(TimeMs now) {
|
||||
|
@@ -1233,13 +1233,6 @@ void HistoryMessage::applyEditionToEmpty() {
|
||||
finishEditionToEmpty();
|
||||
}
|
||||
|
||||
void HistoryMessage::markMediaAsReadHook() {
|
||||
if (mentionsMe()) {
|
||||
history()->updateChatListEntry();
|
||||
history()->eraseFromUnreadMentions(id);
|
||||
}
|
||||
}
|
||||
|
||||
bool HistoryMessage::displayForwardedFrom() const {
|
||||
if (auto forwarded = Get<HistoryMessageForwarded>()) {
|
||||
return Has<HistoryMessageVia>()
|
||||
|
@@ -166,8 +166,6 @@ private:
|
||||
int performResizeGetHeight();
|
||||
void applyEditionToEmpty();
|
||||
|
||||
void markMediaAsReadHook() override;
|
||||
|
||||
bool displayForwardedFrom() const;
|
||||
void paintFromName(Painter &p, QRect &trect, bool selected) const;
|
||||
void paintForwardedInfo(Painter &p, QRect &trect, bool selected) const;
|
||||
|
Reference in New Issue
Block a user