| 413 | } |
| 414 | |
| 415 | not_null<Row*> Entry::addToChatList( |
| 416 | FilterId filterId, |
| 417 | not_null<MainList*> list) { |
| 418 | if (filterId) { |
| 419 | const auto &list = owner().chatsFilters().list(); |
| 420 | const auto it = ranges::find(list, filterId, &Data::ChatFilter::id); |
| 421 | if (it != end(list)) { |
| 422 | setColorIndexForFilterId(filterId, it->colorIndex()); |
| 423 | } |
| 424 | } |
| 425 | if (const auto main = maybeMainChatListLink(filterId)) { |
| 426 | return main; |
| 427 | } |
| 428 | return _chatListLinks.emplace( |
| 429 | filterId, |
| 430 | list->addEntry(this) |
| 431 | ).first->second.main; |
| 432 | } |
| 433 | |
| 434 | void Entry::removeFromChatList( |
| 435 | FilterId filterId, |
no test coverage detected