From 4afd49d0a7cb79eeff2c6066548a8c74efc70257 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Fri, 1 May 2020 13:15:05 +0200 Subject: [PATCH] read the cid from headermemo into qstring --- src/controller.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index cf73946..0871d6b 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -885,7 +885,7 @@ void Controller::refreshTransactions() { address, QString(""), memo, - "", // we have to set the cid here, + "", // we have to set the cid here, its included in our Addressbook for this contact txid // true // is an outgoing message ); @@ -924,21 +924,30 @@ void Controller::refreshTransactions() { if (!it["memo"].is_null()) { memo = QString::fromStdString(it["memo"]); } - + TransactionItem tx{ "Receive", datetime, address, txid,confirmations, items }; txdata.push_back(tx); + QString cid; + if (memo.startsWith("{")) { + + cid = memo.mid(14,36); + + }else{ cid = "";} + ChatItem item = ChatItem( datetime, address, QString(""), memo, - "", // we have to set the cid here + cid, // we have to set the cid here, its included in the headermemo txid ); + qDebug()<addMessage(item); items.push_back(TransactionItemDetail{