| 154 | } |
| 155 | |
| 156 | void Folder::registerOne(not_null<History*> history) { |
| 157 | if (_chatsList.indexed()->size() == 1) { |
| 158 | updateChatListSortPosition(); |
| 159 | if (!_chatsList.cloudUnreadKnown()) { |
| 160 | owner().histories().requestDialogEntry(this); |
| 161 | } |
| 162 | } else { |
| 163 | updateChatListEntry(); |
| 164 | } |
| 165 | reorderLastHistories(); |
| 166 | } |
| 167 | |
| 168 | void Folder::unregisterOne(not_null<History*> history) { |
| 169 | if (_chatsList.empty()) { |
no test coverage detected