void clearPeerCloudDraft(PeerId peerId) { auto history = App::history(peerId); history->clearCloudDraft(); history->clearLocalDraft(); history->updateChatListSortPosition(); if (auto main = App::main()) { main->applyCloudDraft(history); } }
void clearPeerCloudDraft(PeerId peerId, TimeId date) { const auto history = App::history(peerId); if (history->skipCloudDraft(QString(), MsgId(0), date)) { return; } history->clearCloudDraft(); history->clearLocalDraft(); if (Auth().supportMode()) { history->updateChatListEntry(); Auth().supportHelper().cloudDraftChanged(history); } else { history->updateChatListSortPosition(); } if (auto main = App::main()) { main->applyCloudDraft(history); } }