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
|
if (c.second.getMemo().startsWith("{\n \"c\": \"true\"")){
|
||||||
QDateTime myDateTime;
|
|
||||||
|
// 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());
|
myDateTime.setTime_t(c.second.getTimestamp());
|
||||||
//qDebug() << "[" << myDateTime.toString("dd.MM.yyyy hh:mm:ss ") << "] " << "<" << c.second.getAddress() << "> :" << c.second.getMemo();
|
//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");
|
line += QString(c.second.getMemo()) + QString("\n");
|
||||||
view->addItem(line);
|
view->addItem(line);
|
||||||
line ="";
|
line ="";
|
||||||
// }
|
}
|
||||||
// else{
|
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -880,10 +880,7 @@ void Controller::refreshTransactions()
|
|||||||
if (!o["memo"].is_null())
|
if (!o["memo"].is_null())
|
||||||
{
|
{
|
||||||
memo = QString::fromStdString(o["memo"]);
|
memo = QString::fromStdString(o["memo"]);
|
||||||
if (memo.startsWith("{"))
|
|
||||||
{
|
|
||||||
|
|
||||||
}else{
|
|
||||||
ChatItem item = ChatItem(
|
ChatItem item = ChatItem(
|
||||||
datetime,
|
datetime,
|
||||||
address,
|
address,
|
||||||
@@ -892,8 +889,7 @@ void Controller::refreshTransactions()
|
|||||||
true // is an outgoing message
|
true // is an outgoing message
|
||||||
);
|
);
|
||||||
chatModel->addMessage(item);
|
chatModel->addMessage(item);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -934,11 +930,7 @@ void Controller::refreshTransactions()
|
|||||||
if (!it["memo"].is_null())
|
if (!it["memo"].is_null())
|
||||||
{
|
{
|
||||||
memo = QString::fromStdString(it["memo"]);
|
memo = QString::fromStdString(it["memo"]);
|
||||||
if (memo.startsWith("{"))
|
|
||||||
{
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
ChatItem item = ChatItem(
|
ChatItem item = ChatItem(
|
||||||
datetime,
|
datetime,
|
||||||
address,
|
address,
|
||||||
@@ -946,7 +938,7 @@ void Controller::refreshTransactions()
|
|||||||
memo
|
memo
|
||||||
);
|
);
|
||||||
chatModel->addMessage(item);
|
chatModel->addMessage(item);
|
||||||
}}
|
}
|
||||||
|
|
||||||
|
|
||||||
items.push_back(
|
items.push_back(
|
||||||
|
|||||||
@@ -1374,19 +1374,6 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</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">
|
<widget class="QLabel" name="memoSizeChat">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
|||||||
Reference in New Issue
Block a user