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

Method setupTopicViewer

Telegram/SourceFiles/info/info_controller.cpp:373–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void Controller::setupTopicViewer() {
374 session().data().itemIdChanged(
375 ) | rpl::on_next([=](const Data::Session::IdChange &change) {
376 if (const auto topic = _key.topic()) {
377 if (topic->rootId() == change.oldId
378 || (topic->peer()->id == change.newId.peer
379 && topic->rootId() == change.newId.msg)) {
380 const auto now = topic->forum()->topicFor(change.newId.msg);
381 _key = Key(now);
382 replaceWith(std::make_shared<Memento>(now, _section));
383 }
384 }
385 }, _lifetime);
386}
387
388Wrap Controller::wrap() const {
389 return _widget->wrap();

Callers

nothing calls this directly

Calls 8

itemIdChangedMethod · 0.80
rootIdMethod · 0.80
topicForMethod · 0.80
KeyClass · 0.70
dataMethod · 0.45
topicMethod · 0.45
peerMethod · 0.45
forumMethod · 0.45

Tested by

no test coverage detected