2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

Create dialog rows only with known folders.

This commit is contained in:
John Preston
2019-04-18 13:00:38 +04:00
parent 854870683b
commit f3ed7a674a
7 changed files with 50 additions and 27 deletions

View File

@@ -91,7 +91,7 @@ void Entry::updateChatListSortPosition() {
? ProxyPromotedDialogPos()
: isPinnedDialog()
? PinnedDialogPos(_pinnedIndex)
: DialogPosFromDate(adjustChatListTimeId());
: DialogPosFromDate(adjustedChatListTimeId());
if (needUpdateInChatList()) {
setChatListExistence(true);
}
@@ -112,7 +112,7 @@ void Entry::setChatListExistence(bool exists) {
}
}
TimeId Entry::adjustChatListTimeId() const {
TimeId Entry::adjustedChatListTimeId() const {
return chatListTimeId();
}
@@ -145,13 +145,11 @@ PositionChange Entry::adjustByPosInChatList(Mode list) {
}
void Entry::setChatListTimeId(TimeId date) {
if (_timeId && _timeId >= date) {
if (!inChatList(Dialogs::Mode::All)) {
return;
}
}
_timeId = date;
updateChatListSortPosition();
if (const auto folder = this->folder()) {
folder->updateChatListSortPosition();
}
}
int Entry::posInChatList(Dialogs::Mode list) const {