mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Don't autoread mentions with voice/video messages.
Voice/video message unread flag is the same that mention unread flag. If we mark such mentions as read together with all others we mark media as watched/listened instantly when they appear on the screen. So now we mark as read only simple mentions, without "unread" media.
This commit is contained in:
@@ -920,7 +920,7 @@ void HistoryMessage::updateSentMedia(const MTPMessageMedia *media) {
|
||||
}
|
||||
|
||||
void HistoryMessage::addToUnreadMentions(UnreadMentionType type) {
|
||||
if (IsServerMsgId(id) && mentionsMe() && isMediaUnread()) {
|
||||
if (IsServerMsgId(id) && isUnreadMention()) {
|
||||
if (history()->addToUnreadMentions(id, type)) {
|
||||
Notify::peerUpdatedDelayed(
|
||||
history()->peer,
|
||||
@@ -930,7 +930,7 @@ void HistoryMessage::addToUnreadMentions(UnreadMentionType type) {
|
||||
}
|
||||
|
||||
void HistoryMessage::eraseFromUnreadMentions() {
|
||||
if (mentionsMe() && isMediaUnread()) {
|
||||
if (isUnreadMention()) {
|
||||
history()->eraseFromUnreadMentions(id);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user