From 08b004f6a5d502d70532dac7e2560b81a7a2a716 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Sun, 7 Feb 2021 18:23:59 +0100 Subject: [PATCH] Hide empty private chats from list --- src/chatlistmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/chatlistmodel.cpp b/src/chatlistmodel.cpp index 2de3356..5d354f7 100644 --- a/src/chatlistmodel.cpp +++ b/src/chatlistmodel.cpp @@ -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) {