2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Mark topics as read on reply from notification.

This commit is contained in:
John Preston
2022-10-25 13:05:14 +04:00
parent ef3ed760b1
commit 06d1644baa
4 changed files with 14 additions and 3 deletions

View File

@@ -2999,7 +2999,14 @@ void ApiWrap::sharedMediaDone(
void ApiWrap::sendAction(const SendAction &action) {
if (!action.options.scheduled) {
_session->data().histories().readInbox(action.history);
const auto topic = action.topicRootId
? action.history->peer->forumTopicFor(action.topicRootId)
: nullptr;
if (topic) {
topic->readTillEnd();
} else {
_session->data().histories().readInbox(action.history);
}
action.history->getReadyFor(ShowAtTheEndMsgId);
}
_sendActions.fire_copy(action);