2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +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

@@ -234,8 +234,14 @@ void Folder::requestChatListMessage() {
}
}
TimeId Folder::adjustedChatListTimeId() const {
return _chatsList.empty()
? TimeId(0)
: (*_chatsList.begin())->entry()->adjustedChatListTimeId();
}
int Folder::unreadCount() const {
return _unreadCount ? *_unreadCount : 0;
return _unreadCount.value_or(0);
}
rpl::producer<int> Folder::unreadCountValue() const {