| 348 | } |
| 349 | |
| 350 | void Folder::applyDialog(const MTPDdialogFolder &data) { |
| 351 | _chatsList.updateCloudUnread(data); |
| 352 | if (const auto peerId = peerFromMTP(data.vpeer())) { |
| 353 | const auto history = owner().history(peerId); |
| 354 | const auto fullId = FullMsgId(peerId, data.vtop_message().v); |
| 355 | history->setFolder(this, owner().message(fullId)); |
| 356 | } else { |
| 357 | _chatsList.clear(); |
| 358 | updateChatListExistence(); |
| 359 | } |
| 360 | if (_chatsList.indexed()->size() < kLoadedChatsMinCount) { |
| 361 | session().api().requestDialogs(this); |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | void Folder::applyPinnedUpdate(const MTPDupdateDialogPinned &data) { |
| 366 | const auto folderId = data.vfolder_id().value_or_empty(); |
no test coverage detected