Skip to content

Commit

Permalink
add request Hush via chat
Browse files Browse the repository at this point in the history
  • Loading branch information
DenioD committed Jun 20, 2020
1 parent 1b024d0 commit 969b79a
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 7 deletions.
1 change: 1 addition & 0 deletions application.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<file>res/dark-01.png</file>
<file>res/money-mouth.png</file>
<file>res/money-outgoing.png</file>
<file>res/hush-money-white.png</file>
</qresource>
<qresource prefix="/img">
<file>res/hushdlogo.gif</file>
Expand Down
Binary file added res/hush-money-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/hush-money.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 35 additions & 1 deletion src/Model/ChatItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ QString ChatItem::toChatLine()
{
QDateTime myDateTime;
QString lock;
QString money;
QString moneyText;
myDateTime.setTime_t(_timestamp);

if (_notarize == true)
Expand All @@ -176,10 +178,42 @@ QString ChatItem::toChatLine()

lock = "<b> <img src=':/icons/res/lock_green.png'><b>";
}

if (_memo.startsWith("Money transaction of :"))
{
if (_outgoing == true)
{

moneyText = QString("<p> Outgoing Money Transaction </p>") + QString("<b> <img src=':/icons/res/money-outgoing.png'><b>");
}else{


moneyText = QString("<p> Incoming Money Transaction </p>") + QString("<b> <img src=':/icons/res/money-mouth.png'><b>");

}
}else{money = "";
moneyText = ""; }

if (_memo.startsWith("Request of :"))
{
if (_outgoing == true)
{

moneyText = QString("<p> Outgoing Hush Request </p>") + QString("<b> <img src=':/icons/res/money-outgoing.png'><b>");
}else{


moneyText = QString("<p> Incoming Hush Request </p>") + QString("<b> <img src=':/icons/res/money-mouth.png'><b>");

}
}else{money = "";
moneyText = ""; }




QString line = QString("<small>") + myDateTime.toString("yyyy-MM-dd hh:mm");
line += QString(lock) + QString("</small>");
line += QString(lock) + QString(moneyText) + QString("</small>");
line +=QString("<p>") + _memo.toHtmlEscaped() + QString("</p>");
return line;
}
Expand Down
Loading

0 comments on commit 969b79a

Please sign in to comment.