void Entry::updateChatListEntry() const { if (const auto main = App::main()) { if (inChatList(Mode::All)) { main->repaintDialogRow( Mode::All, mainChatListLink(Mode::All)); if (inChatList(Mode::Important)) { main->repaintDialogRow( Mode::Important, mainChatListLink(Mode::Important)); } } } }
void Entry::removeChatListEntryByLetter(Mode list, QChar letter) { Expects(letter != 0); if (inChatList(list)) { chatListLinks(list).remove(letter); } }
void Entry::removeFromChatList( Dialogs::Mode list, not_null<Dialogs::IndexedList*> indexed) { if (inChatList(list)) { indexed->del(_key); chatListLinks(list).clear(); changedInChatListHook(list, false); } }
not_null<Row*> Entry::addToChatList( Mode list, not_null<IndexedList*> indexed) { if (!inChatList(list)) { chatListLinks(list) = indexed->addToEnd(_key); changedInChatListHook(list, true); } return mainChatListLink(list); }
void Entry::setChatsListTimeId(TimeId date) { if (_lastMessageTimeId && _lastMessageTimeId >= date) { if (!inChatList(Dialogs::Mode::All)) { return; } } _lastMessageTimeId = date; updateChatListSortPosition(); }
void Entry::updateChatListEntry() const { if (const auto main = App::main()) { if (inChatList(Mode::All)) { main->repaintDialogRow( Mode::All, mainChatListLink(Mode::All)); if (inChatList(Mode::Important)) { main->repaintDialogRow( Mode::Important, mainChatListLink(Mode::Important)); } } if (Auth().supportMode() && !Auth().settings().supportAllSearchResults()) { main->repaintDialogRow({ _key, FullMsgId() }); } } }
void Entry::addChatListEntryByLetter( Mode list, QChar letter, not_null<Row*> row) { Expects(letter != 0); if (inChatList(list)) { chatListLinks(list).emplace(letter, row); } }
bool Entry::needUpdateInChatList() const { return inChatList(Dialogs::Mode::All) || shouldBeInChatList(); }