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

Method applyPinnedChats

Telegram/SourceFiles/data/data_session.cpp:2541–2560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2539}
2540
2541void Session::applyPinnedChats(
2542 Data::Folder *folder,
2543 const QVector<MTPDialogPeer> &list) {
2544 for (const auto &peer : list) {
2545 peer.match([&](const MTPDdialogPeer &data) {
2546 const auto history = this->history(peerFromMTP(data.vpeer()));
2547 if (folder) {
2548 history->setFolder(folder);
2549 } else {
2550 history->clearFolder();
2551 }
2552 }, [&](const MTPDdialogPeerFolder &data) {
2553 if (folder) {
2554 LOG(("API Error: Nested folders detected."));
2555 }
2556 });
2557 }
2558 chatsList(folder)->pinned()->applyList(this, list);
2559 notifyPinnedDialogsOrderUpdated();
2560}
2561
2562void Session::applyPinnedTopics(
2563 not_null<Data::Forum*> forum,

Callers 1

feedUpdateMethod · 0.80

Calls 6

historyMethod · 0.95
peerFromMTPFunction · 0.85
setFolderMethod · 0.80
clearFolderMethod · 0.80
applyListMethod · 0.45
pinnedMethod · 0.45

Tested by

no test coverage detected