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

Method applyTopicAdded

Telegram/SourceFiles/data/data_forum.cpp:493–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493ForumTopic *Forum::applyTopicAdded(
494 MsgId rootId,
495 const QString &title,
496 int32 colorId,
497 DocumentId iconId,
498 PeerId creatorId,
499 TimeId date,
500 bool my) {
501 Expects(rootId != 0);
502
503 const auto i = _topics.find(rootId);
504 const auto raw = (i != end(_topics))
505 ? i->second.get()
506 : _topics.emplace(
507 rootId,
508 std::make_unique<ForumTopic>(this, rootId)
509 ).first->second.get();
510 raw->applyTitle(title);
511 raw->applyColorId(colorId);
512 raw->applyIconId(iconId);
513 raw->applyCreator(creatorId);
514 raw->applyCreationDate(date);
515 raw->applyIsMy(my);
516 if (!creating(rootId)) {
517 raw->addToChatList(FilterId(), topicsList());
518 _chatsListChanges.fire({});
519 reorderLastTopics();
520 }
521 return raw;
522}
523
524MsgId Forum::reserveCreatingId(
525 const QString &title,

Callers 1

applyServiceChangesMethod · 0.80

Calls 11

emplaceMethod · 0.80
applyTitleMethod · 0.80
applyColorIdMethod · 0.80
applyIconIdMethod · 0.80
applyCreationDateMethod · 0.80
applyIsMyMethod · 0.80
addToChatListMethod · 0.80
findMethod · 0.45
getMethod · 0.45
applyCreatorMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected