render only new requests

This commit is contained in:
DenioD
2020-05-27 21:42:39 +02:00
parent f57dc2c5ad
commit cfbcc43b14
18 changed files with 157 additions and 55 deletions

View File

@@ -3,6 +3,8 @@
#include "ChatDataStore.h"
#include "addressbook.h"
#include "chatmodel.h"
ChatDataStore* ChatDataStore::getInstance()
{
@@ -53,15 +55,14 @@ std::map<QString, ChatItem> ChatDataStore::getAllNewContactRequests()
{
std::map<QString, ChatItem> filteredItems;
for(auto &c: this->data)
for(auto &c: this->data)
{
if (
(c.second.isOutgoing() == false) &&
(c.second.getType() == "Cont") &&
(c.second.getContact() == "")
(c.second.isContact() == false)
)
{
filteredItems[c.first] = c.second;
}