update// moved class to a normal variable instace

This commit is contained in:
Strider
2020-04-27 20:18:14 +02:00
parent 008d3fd6c2
commit a8ee1c68be
3 changed files with 44 additions and 22 deletions

View File

@@ -10,6 +10,7 @@ template<>
DataStore<QString>* DataStore<QString>::instance = nullptr;
template<>
bool DataStore<QString>::instanced = false;
ChatModel *chatModel = new ChatModel();
using json = nlohmann::json;
@@ -877,6 +878,7 @@ void Controller::refreshTransactions()
QString memo;
if (!o["memo"].is_null())
{
memo = QString::fromStdString(o["memo"]);
ChatItem item = ChatItem(
datetime,
address,
@@ -885,7 +887,7 @@ void Controller::refreshTransactions()
true // is an outgoing message
);
chatModel->addMessage(item);
memo = QString::fromStdString(o["memo"]);
}
@@ -925,6 +927,7 @@ void Controller::refreshTransactions()
QString memo;
if (!it["memo"].is_null())
{
memo = QString::fromStdString(it["memo"]);
ChatItem item = ChatItem(
datetime,
address,
@@ -933,7 +936,7 @@ void Controller::refreshTransactions()
);
chatModel->addMessage(item);
}
memo = QString::fromStdString(it["memo"]);
items.push_back(
TransactionItemDetail{