| 220 | } |
| 221 | |
| 222 | void InactiveController::prepare() { |
| 223 | _requestId = _session->api().request(MTPchannels_GetInactiveChannels( |
| 224 | )).done([=](const MTPmessages_InactiveChats &result) { |
| 225 | _requestId = 0; |
| 226 | const auto &data = result.data(); |
| 227 | _session->data().processUsers(data.vusers()); |
| 228 | const auto &list = data.vchats().v; |
| 229 | const auto &dates = data.vdates().v; |
| 230 | for (auto i = 0, count = int(list.size()); i != count; ++i) { |
| 231 | const auto peer = _session->data().processChat(list[i]); |
| 232 | const auto date = (i < dates.size()) ? dates[i].v : TimeId(); |
| 233 | appendRow(peer, date); |
| 234 | } |
| 235 | delegate()->peerListRefreshRows(); |
| 236 | _count = delegate()->peerListFullRowsCount(); |
| 237 | }).send(); |
| 238 | } |
| 239 | |
| 240 | void InactiveController::rowClicked(not_null<PeerListRow*> row) { |
| 241 | delegate()->peerListSetRowChecked(row, !row->checked()); |
nothing calls this directly
no test coverage detected