2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Moved out StatisticsRequestSender to separated file.

This commit is contained in:
23rd
2024-06-19 05:46:13 +03:00
committed by John Preston
parent b5d5ff3cbb
commit f23c9a61bc
7 changed files with 156 additions and 96 deletions

View File

@@ -4683,16 +4683,16 @@ uint64 Session::wallpapersHash() const {
return _wallpapersHash;
}
MTP::DcId Session::statsDcId(not_null<ChannelData*> channel) {
const auto it = _channelStatsDcIds.find(channel);
return (it == end(_channelStatsDcIds)) ? MTP::DcId(0) : it->second;
MTP::DcId Session::statsDcId(not_null<PeerData*> peer) {
const auto it = _peerStatsDcIds.find(peer);
return (it == end(_peerStatsDcIds)) ? MTP::DcId(0) : it->second;
}
void Session::applyStatsDcId(
not_null<ChannelData*> channel,
not_null<PeerData*> peer,
MTP::DcId dcId) {
if (dcId != channel->session().mainDcId()) {
_channelStatsDcIds[channel] = dcId;
if (dcId != peer->session().mainDcId()) {
_peerStatsDcIds[peer] = dcId;
}
}