dont refresh to often
This commit is contained in:
@@ -60,7 +60,8 @@ std::map<QString, ChatItem> ChatDataStore::getAllNewContactRequests()
|
|||||||
if (
|
if (
|
||||||
(c.second.isOutgoing() == false) &&
|
(c.second.isOutgoing() == false) &&
|
||||||
(c.second.getType() == "Cont") &&
|
(c.second.getType() == "Cont") &&
|
||||||
(c.second.isContact() == false)
|
(c.second.isContact() == false) &&
|
||||||
|
(c.second.getMemo().isEmpty())
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ void MainWindow::sendChat() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
rpc->refresh(true);
|
// rpc->refresh(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MainWindow::doSendChatTxValidations(Tx tx) {
|
QString MainWindow::doSendChatTxValidations(Tx tx) {
|
||||||
|
|||||||
@@ -964,21 +964,11 @@ void Controller::refreshTransactions() {
|
|||||||
publickey = "";
|
publickey = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int lengthcid = cid.length();
|
|
||||||
|
|
||||||
char *cidchar = NULL;
|
|
||||||
cidchar = new char[lengthcid+1];
|
|
||||||
strncpy(cidchar, cid.toLocal8Bit(), lengthcid +1);
|
|
||||||
|
|
||||||
/////We need to filter out Memos smaller then the ciphertext size, or it will dump
|
/////We need to filter out Memos smaller then the ciphertext size, or it will dump
|
||||||
|
|
||||||
if ((memo.startsWith("{") == false) && (headerbytes > 0))
|
if ((memo.startsWith("{") == false) && (headerbytes > 0))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//QString myAddr = p.getMyAddress();
|
|
||||||
QString passphrase = main->getPassword();
|
QString passphrase = main->getPassword();
|
||||||
QString hashEncryptionKey = passphrase;
|
QString hashEncryptionKey = passphrase;
|
||||||
int length = hashEncryptionKey.length();
|
int length = hashEncryptionKey.length();
|
||||||
@@ -1068,11 +1058,11 @@ void Controller::refreshTransactions() {
|
|||||||
if (ui->decryptionMessage->isChecked()){
|
if (ui->decryptionMessage->isChecked()){
|
||||||
memodecrypt = QString::fromUtf8( decryptedMemo.data(), decryptedMemo.size());
|
memodecrypt = QString::fromUtf8( decryptedMemo.data(), decryptedMemo.size());
|
||||||
DataStore::getChatDataStore()->clear();
|
DataStore::getChatDataStore()->clear();
|
||||||
this->refresh(true);
|
// this->refresh(true);
|
||||||
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
||||||
}else{ memodecrypt = memo;
|
}else{ memodecrypt = memo;
|
||||||
DataStore::getChatDataStore()->clear();
|
DataStore::getChatDataStore()->clear();
|
||||||
this->refresh(true);
|
// this->refresh(true);
|
||||||
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1097,7 +1087,7 @@ void Controller::refreshTransactions() {
|
|||||||
);
|
);
|
||||||
DataStore::getChatDataStore()->setData(ChatIDGenerator::getInstance()->generateID(item), item);
|
DataStore::getChatDataStore()->setData(ChatIDGenerator::getInstance()->generateID(item), item);
|
||||||
|
|
||||||
|
updateUIBalances();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
@@ -1117,7 +1107,7 @@ void Controller::refreshTransactions() {
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
DataStore::getChatDataStore()->setData(ChatIDGenerator::getInstance()->generateID(item), item);
|
DataStore::getChatDataStore()->setData(ChatIDGenerator::getInstance()->generateID(item), item);
|
||||||
|
updateUIBalances();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1181,7 +1171,7 @@ void Controller::refreshTransactions() {
|
|||||||
chatModel->addAddressbylabel(address, requestZaddr);
|
chatModel->addAddressbylabel(address, requestZaddr);
|
||||||
} else{}
|
} else{}
|
||||||
|
|
||||||
|
}
|
||||||
if (chatModel->Addressbylabel(address) != QString("0xdeadbeef")){
|
if (chatModel->Addressbylabel(address) != QString("0xdeadbeef")){
|
||||||
|
|
||||||
isContact = true;
|
isContact = true;
|
||||||
@@ -1359,12 +1349,15 @@ void Controller::refreshTransactions() {
|
|||||||
if (ui->decryptionMessage->isChecked()){
|
if (ui->decryptionMessage->isChecked()){
|
||||||
memodecrypt = QString::fromUtf8( decryptedMemo.data(), decryptedMemo.size());
|
memodecrypt = QString::fromUtf8( decryptedMemo.data(), decryptedMemo.size());
|
||||||
DataStore::getChatDataStore()->clear();
|
DataStore::getChatDataStore()->clear();
|
||||||
this->refresh(true);
|
// this->refresh(true);
|
||||||
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
|
||||||
}else{ memodecrypt = memo;
|
|
||||||
DataStore::getChatDataStore()->clear();
|
|
||||||
this->refresh(true);
|
|
||||||
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
memodecrypt = memo;
|
||||||
|
DataStore::getChatDataStore()->clear();
|
||||||
|
//this->refresh(true);
|
||||||
|
chat->renderChatBox(ui, ui->listChat,ui->memoSizeChat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1415,7 +1408,7 @@ void Controller::refreshTransactions() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ public:
|
|||||||
void refreshGBPCAP();
|
void refreshGBPCAP();
|
||||||
void refreshAUDCAP();
|
void refreshAUDCAP();
|
||||||
|
|
||||||
|
|
||||||
void refreshChat(QListView *listWidget, QLabel *label);
|
void refreshChat(QListView *listWidget, QLabel *label);
|
||||||
void refreshContacts(QListView *listWidget);
|
void refreshContacts(QListView *listWidget);
|
||||||
|
|
||||||
|
|||||||
@@ -1358,6 +1358,8 @@ void MainWindow::setupchatTab() {
|
|||||||
ui->memoTxtChat->setTextColor("Black");
|
ui->memoTxtChat->setTextColor("Black");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->decryptionMessage->setChecked(true);
|
||||||
|
|
||||||
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChat);
|
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChat);
|
||||||
QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::addContact);
|
QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::addContact);
|
||||||
QObject::connect(ui->pushContact, &QPushButton::clicked, this , &MainWindow::renderContactRequest);
|
QObject::connect(ui->pushContact, &QPushButton::clicked, this , &MainWindow::renderContactRequest);
|
||||||
|
|||||||
Reference in New Issue
Block a user