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