2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Keep track of scheduled messages.

This commit is contained in:
John Preston
2019-08-08 15:13:26 +01:00
parent 549789bfb7
commit 3814b0833d
23 changed files with 477 additions and 104 deletions

View File

@@ -205,8 +205,9 @@ Session::Session(not_null<Main::Session*> session)
, _sendActionsAnimation([=](crl::time now) {
return sendActionsAnimationCallback(now);
})
, _unmuteByFinishedTimer([=] { unmuteByFinished(); })
, _groups(this)
, _unmuteByFinishedTimer([=] { unmuteByFinished(); }) {
, _scheduledMessages(this) {
_cache->open(Local::cacheKey());
_bigFileCache->open(Local::cacheBigFileKey());
@@ -1814,10 +1815,10 @@ void Session::removeDependencyMessage(not_null<HistoryItem*> item) {
}
void Session::destroyMessage(not_null<HistoryItem*> item) {
Expects(!item->isLogEntry() || !item->mainView());
Expects(item->isHistoryEntry() || !item->mainView());
const auto peerId = item->history()->peer->id;
if (!item->isLogEntry()) {
if (item->isHistoryEntry()) {
// All this must be done for all items manually in History::clear()!
item->eraseFromUnreadMentions();
if (IsServerMsgId(item->id)) {