2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Mark all types of local history items.

This commit is contained in:
John Preston
2019-09-06 10:53:44 +03:00
parent b0c5a75fb9
commit 7893ad0558
6 changed files with 26 additions and 26 deletions

View File

@@ -685,13 +685,6 @@ void History::checkForLoadedAtTop(not_null<HistoryItem*> added) {
}
}
HistoryItem *History::addToHistory(
const MTPMessage &msg,
MTPDmessage_ClientFlags clientFlags) {
const auto detachExistingItem = false;
return createItem(msg, clientFlags, detachExistingItem);
}
not_null<HistoryItem*> History::addNewLocalMessage(
MsgId id,
MTPDmessage::Flags flags,
@@ -880,8 +873,9 @@ void History::addUnreadMentionsSlice(const MTPmessages_Messages &result) {
auto added = false;
if (messages) {
const auto clientFlags = MTPDmessage_ClientFlags();
for (auto &message : *messages) {
if (auto item = addToHistory(message, clientFlags)) {
const auto type = NewMessageType::Existing;
for (const auto &message : *messages) {
if (const auto item = addNewMessage(message, clientFlags, type)) {
if (item->isUnreadMention()) {
_unreadMentions.insert(item->id);
added = true;