From b99a0b121092d5b9bb91ceacd4ba12af41fc3c7e Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sat, 9 May 2020 13:03:46 +0200 Subject: [PATCH] add position of txs --- src/controller.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index 1192aff..2c213a0 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -856,8 +856,7 @@ void Controller::refreshTransactions() { address = QString::fromStdString(o["address"]); - - // qDebug()<< "Position :" << position; + // Sent items are -ve CAmount amount = CAmount::fromqint64(-1* o["value"].get()); @@ -885,9 +884,9 @@ void Controller::refreshTransactions() { memo, QString(""), QString(""), - cid, // we have to set the cid here, its included in our Addressbook for this contact + cid, txid, - true // is an outgoing message + true ); DataStore::getChatDataStore()->setData(chatModel->generateChatItemID(item), item); //chatModel->addMessage(item); @@ -910,7 +909,6 @@ void Controller::refreshTransactions() { } - txdata.push_back(TransactionItem{ "send", datetime, address, txid,confirmations, items }); @@ -940,6 +938,7 @@ void Controller::refreshTransactions() { QString type; QString cid; + int position; QString requestZaddr1; QString requestZaddr; @@ -984,6 +983,7 @@ void Controller::refreshTransactions() { }else{ contact = "";} + position = it["position"].get(); ChatItem item = ChatItem( datetime, address, @@ -991,12 +991,13 @@ void Controller::refreshTransactions() { memo, requestZaddr, type, - cid, // we have to set the cid here, its included in the headermemo + cid, txid, false ); DataStore::getChatDataStore()->setData(chatModel->generateChatItemID(item), item); - //chatModel->addMessage(item); + + qDebug() << "Position der Message : " << position; } }