Hide empty private chats from list

This commit is contained in:
Sebastian Wolf 2021-02-07 18:23:59 +01:00
parent f6e21b6428
commit 08b004f6a5
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A

View file

@ -260,7 +260,11 @@ bool ChatListModel::ChatData::isHidden() const
}
break;
case TDLibWrapper::ChatTypeUnknown:
break;
case TDLibWrapper::ChatTypePrivate:
if (chatData.value(LAST_MESSAGE).isNull()) {
return true;
}
break;
case TDLibWrapper::ChatTypeSecret:
if (secretChatState == TDLibWrapper::SecretChatStateClosed) {