| 45 | } |
| 46 | |
| 47 | void 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 | |
| 70 | auto SendActionManager::repliesPainter( |
| 71 | not_null<History*> history, |
no test coverage detected