MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / applyDialog

Method applyDialog

Telegram/SourceFiles/data/data_folder.cpp:350–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void Folder::applyDialog(const MTPDdialogFolder &data) {
351 _chatsList.updateCloudUnread(data);
352 if (const auto peerId = peerFromMTP(data.vpeer())) {
353 const auto history = owner().history(peerId);
354 const auto fullId = FullMsgId(peerId, data.vtop_message().v);
355 history->setFolder(this, owner().message(fullId));
356 } else {
357 _chatsList.clear();
358 updateChatListExistence();
359 }
360 if (_chatsList.indexed()->size() < kLoadedChatsMinCount) {
361 session().api().requestDialogs(this);
362 }
363}
364
365void Folder::applyPinnedUpdate(const MTPDupdateDialogPinned &data) {
366 const auto folderId = data.vfolder_id().value_or_empty();

Callers 1

applyPeerDialogsMethod · 0.45

Calls 11

peerFromMTPFunction · 0.85
updateCloudUnreadMethod · 0.80
setFolderMethod · 0.80
indexedMethod · 0.80
requestDialogsMethod · 0.80
apiMethod · 0.80
FullMsgIdClass · 0.70
historyMethod · 0.45
messageMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected