add new icons, dont write over send button

This commit is contained in:
DenioD
2020-05-20 20:53:14 +02:00
parent 15122be4f8
commit 41e3bbdfae
19 changed files with 152 additions and 126 deletions

View File

@@ -2,6 +2,7 @@
// GPLv3
#include "ChatDataStore.h"
#include "addressbook.h"
ChatDataStore* ChatDataStore::getInstance()
{
@@ -48,15 +49,15 @@ std::map<QString, ChatItem> ChatDataStore::getAllRawChatItems()
return this->data;
}
std::map<QString, ChatItem> ChatDataStore::getAllContactRequests()
std::map<QString, ChatItem> ChatDataStore::getAllNewContactRequests()
{
std::map<QString, ChatItem> filteredItems;
for(auto &c: this->data)
{
if (
(c.second.isOutgoing() == false) &&
(c.second.getType() == "cont") &&
(c.second.getMemo().startsWith("{"))
(c.second.getType() == "cont")
)
{
filteredItems[c.first] = c.second;
@@ -65,6 +66,23 @@ std::map<QString, ChatItem> ChatDataStore::getAllContactRequests()
return filteredItems;
}
std::map<QString, ChatItem> ChatDataStore::getAllOldContactRequests()
{
std::map<QString, ChatItem> filteredItems;
for(auto &p : AddressBook::getInstance()->getAllAddressLabels())
for(auto &c: this->data)
{
if (
(c.second.isOutgoing() == false) &&
(c.second.getType() == "cont") &&
(p.getPartnerAddress() == c.second.getRequestZaddr())
)
{
filteredItems[c.first] = c.second;
}
}
return filteredItems;
}
std::map<QString, ChatItem> ChatDataStore::getAllMemos()
{