void ChatWidgetContainerHandlerMapper::unmap(Chat chat) { auto chatWidgetContainerHandler = m_mapping.value(chat); m_mapping.remove(chat); if (!chatWidgetContainerHandler) return; chatWidgetContainerHandler->removeChat(chat); }
void MessageManager::closeAll(bool Offline) { UserList toRemove; { RLock l(cs); for (auto i : chats) { if (Offline && i.first->isOnline()) continue; toRemove.push_back(i.first); } } for (const auto& u : toRemove) { removeChat(u); } }