do not render any header memo on the chatgui - render a incoming contact request - work in progress
This commit is contained in:
@@ -88,8 +88,21 @@ void ChatModel::renderChatBox(QListWidget *view)
|
||||
|
||||
{
|
||||
|
||||
// if ("" == QString(c.second.getAddress())){ ////// ToDo: render only memos from selected contact
|
||||
QDateTime myDateTime;
|
||||
if (c.second.getMemo().startsWith("{\n \"c\": \"true\"")){
|
||||
|
||||
// Render a incoming contact Request
|
||||
|
||||
}
|
||||
|
||||
if (c.second.getMemo().startsWith("{\n \"c\": \"false\"") ){
|
||||
|
||||
// we dont want to render this
|
||||
|
||||
}
|
||||
|
||||
if (c.second.getMemo().startsWith("{") == false){ //TOdo and is selected in Contact Widget -
|
||||
|
||||
QDateTime myDateTime;
|
||||
|
||||
myDateTime.setTime_t(c.second.getTimestamp());
|
||||
//qDebug() << "[" << myDateTime.toString("dd.MM.yyyy hh:mm:ss ") << "] " << "<" << c.second.getAddress() << "> :" << c.second.getMemo();
|
||||
@@ -98,10 +111,8 @@ void ChatModel::renderChatBox(QListWidget *view)
|
||||
line += QString(c.second.getMemo()) + QString("\n");
|
||||
view->addItem(line);
|
||||
line ="";
|
||||
// }
|
||||
// else{
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -880,10 +880,7 @@ void Controller::refreshTransactions()
|
||||
if (!o["memo"].is_null())
|
||||
{
|
||||
memo = QString::fromStdString(o["memo"]);
|
||||
if (memo.startsWith("{"))
|
||||
{
|
||||
|
||||
}else{
|
||||
ChatItem item = ChatItem(
|
||||
datetime,
|
||||
address,
|
||||
@@ -892,8 +889,7 @@ void Controller::refreshTransactions()
|
||||
true // is an outgoing message
|
||||
);
|
||||
chatModel->addMessage(item);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -934,11 +930,7 @@ void Controller::refreshTransactions()
|
||||
if (!it["memo"].is_null())
|
||||
{
|
||||
memo = QString::fromStdString(it["memo"]);
|
||||
if (memo.startsWith("{"))
|
||||
{
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
ChatItem item = ChatItem(
|
||||
datetime,
|
||||
address,
|
||||
@@ -946,7 +938,7 @@ void Controller::refreshTransactions()
|
||||
memo
|
||||
);
|
||||
chatModel->addMessage(item);
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
items.push_back(
|
||||
|
||||
@@ -1374,19 +1374,6 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btnInsertFrom">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>650</y>
|
||||
<width>158</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Include Reply Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="memoSizeChat">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
||||
Reference in New Issue
Block a user