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

Method addToChatList

Telegram/SourceFiles/dialogs/dialogs_entry.cpp:415–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415not_null<Row*> Entry::addToChatList(
416 FilterId filterId,
417 not_null<MainList*> list) {
418 if (filterId) {
419 const auto &list = owner().chatsFilters().list();
420 const auto it = ranges::find(list, filterId, &Data::ChatFilter::id);
421 if (it != end(list)) {
422 setColorIndexForFilterId(filterId, it->colorIndex());
423 }
424 }
425 if (const auto main = maybeMainChatListLink(filterId)) {
426 return main;
427 }
428 return _chatListLinks.emplace(
429 filterId,
430 list->addEntry(this)
431 ).first->second.main;
432}
433
434void Entry::removeFromChatList(
435 FilterId filterId,

Callers 3

applyTopicAddedMethod · 0.80
refreshChatListEntryMethod · 0.80
applyChangeMethod · 0.80

Calls 4

emplaceMethod · 0.80
addEntryMethod · 0.80
listMethod · 0.45
colorIndexMethod · 0.45

Tested by

no test coverage detected