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

Method registerFor

Telegram/SourceFiles/data/data_send_action.cpp:47–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void SendActionManager::registerFor(
48 not_null<History*> history,
49 MsgId rootId,
50 not_null<UserData*> user,
51 const MTPSendMessageAction &action,
52 TimeId when) {
53 if (history->peer->isSelf()) {
54 return;
55 }
56 const auto sendAction = lookupPainter(history, rootId);
57 if (!sendAction) {
58 return;
59 }
60 if (sendAction->updateNeedsAnimating(user, action)) {
61 user->madeAction(when);
62
63 if (!_sendActions.contains(std::pair{ history, rootId })) {
64 _sendActions.emplace(std::pair{ history, rootId }, crl::now());
65 _animation.start();
66 }
67 }
68}
69
70auto SendActionManager::repliesPainter(
71 not_null<History*> history,

Callers 1

Calls 6

isSelfMethod · 0.80
updateNeedsAnimatingMethod · 0.80
madeActionMethod · 0.80
emplaceMethod · 0.80
containsMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected