mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix bug, fix actions to be like irc, and a disabled feature for future
This commit is contained in:
parent
30e2afcc92
commit
aa55dcae1e
@ -15,11 +15,11 @@
|
||||
*/
|
||||
|
||||
#include "actionaction.h"
|
||||
#include <QDebug>
|
||||
|
||||
ActionAction::ActionAction(const QString &author, QString message, const QString &date, const bool& me) :
|
||||
MessageAction(author, message, date, me)
|
||||
MessageAction(author, author+" "+message, date, me)
|
||||
{
|
||||
message = name + " " + message;
|
||||
}
|
||||
|
||||
void ActionAction::setup(QTextCursor cursor, QTextEdit *)
|
||||
|
@ -778,17 +778,23 @@ void Widget::onGroupNamelistChanged(int groupnumber, int peernumber, uint8_t Cha
|
||||
g = createGroup(groupnumber);
|
||||
}
|
||||
|
||||
QString name = core->getGroupPeerName(groupnumber, peernumber);
|
||||
TOX_CHAT_CHANGE change = static_cast<TOX_CHAT_CHANGE>(Change);
|
||||
if (change == TOX_CHAT_CHANGE_PEER_ADD)
|
||||
{
|
||||
QString name = core->getGroupPeerName(groupnumber, peernumber);
|
||||
if (name.isEmpty())
|
||||
name = tr("<Unknown>", "Placeholder when we don't know someone's name in a group chat");
|
||||
g->addPeer(peernumber,name);
|
||||
//g->chatForm->addSystemInfoMessage(tr("%1 has joined the chat").arg(name), "green");
|
||||
// we can't display these messages until irungentoo fixes peernumbers
|
||||
// https://github.com/irungentoo/toxcore/issues/1128
|
||||
}
|
||||
else if (change == TOX_CHAT_CHANGE_PEER_DEL)
|
||||
{
|
||||
g->removePeer(peernumber);
|
||||
else if (change == TOX_CHAT_CHANGE_PEER_NAME)
|
||||
//g->chatForm->addSystemInfoMessage(tr("%1 has left the chat").arg(name), "silver");
|
||||
}
|
||||
else if (change == TOX_CHAT_CHANGE_PEER_NAME) // core overwrites old name before telling us it changed...
|
||||
g->updatePeer(peernumber,core->getGroupPeerName(groupnumber, peernumber));
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,8 @@ span.quote {
|
||||
}
|
||||
|
||||
div.green {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
color: @white;
|
||||
@ -48,8 +48,8 @@ div.green {
|
||||
}
|
||||
|
||||
div.silver {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
color: @black;
|
||||
@ -58,8 +58,8 @@ div.silver {
|
||||
}
|
||||
|
||||
div.red {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
color: @white;
|
||||
|
Loading…
x
Reference in New Issue
Block a user