render only memos from a valid cid if checkbox is true
This commit is contained in:
@@ -129,24 +129,34 @@ void ChatModel::renderChatBox(Ui::MainWindow* ui, QListWidget *view)
|
|||||||
|
|
||||||
if ((ui->MyZaddr->text().trimmed() == c.second.getAddress()) && (c.second.getMemo().startsWith("{") == false) && (c.second.getMemo().isEmpty() == false)){
|
if ((ui->MyZaddr->text().trimmed() == c.second.getAddress()) && (c.second.getMemo().startsWith("{") == false) && (c.second.getMemo().isEmpty() == false)){
|
||||||
for(auto &p : AddressBook::getInstance()->getAllAddressLabels()){
|
for(auto &p : AddressBook::getInstance()->getAllAddressLabels()){
|
||||||
if ((p.getCid() == c.second.getCid())){
|
|
||||||
line+= QString("[") + "Verified Message" + QString("]"); ////Todo: Render a green checkmark instead of QString
|
if ((ui->checkBox->isChecked() == true) && (p.getCid() != c.second.getCid()))
|
||||||
}else{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
// line+= QString("[") + "Warning. Not verified!" + QString("]");
|
// line+= QString("[") + "Warning. Not verified!" + QString("]");
|
||||||
}
|
|
||||||
}
|
|
||||||
line += QString("[") + myDateTime.toString("dd.MM.yyyy hh:mm:ss ") + QString("] ");
|
line += QString("[") + myDateTime.toString("dd.MM.yyyy hh:mm:ss ") + QString("] ");
|
||||||
line += QString("<") + QString("incoming") + QString("> :\n");
|
line += QString("<") + QString("incoming") + QString("> :\n");
|
||||||
line += QString(c.second.getMemo()) + QString("\n");
|
line += QString(c.second.getMemo()) + QString("\n");
|
||||||
view->addItem(line);
|
view->addItem(line);
|
||||||
line ="";
|
line ="";
|
||||||
}else{}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ChatModel::addCid(QString tx, QString cid)
|
void ChatModel::addCid(QString tx, QString cid)
|
||||||
{
|
{
|
||||||
this->cidMap[tx] = cid;
|
this->cidMap[tx] = cid;
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->checkBox->setChecked(true);
|
||||||
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("silentdragonlite-wallet.log"));
|
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("silentdragonlite-wallet.log"));
|
||||||
|
|
||||||
// Status Bar
|
// Status Bar
|
||||||
|
|||||||
Reference in New Issue
Block a user