mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
ddddddddddddddddddddddddddddd
This commit is contained in:
parent
b7de109335
commit
e68f885dff
11
message.cpp
11
message.cpp
|
@ -23,7 +23,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
|
|||
auto words = new QList<Word>();
|
||||
|
||||
// timestamps
|
||||
iterator = ircMessage.tags().find("tmi-sent-ts");
|
||||
auto iterator = ircMessage.tags().find("tmi-sent-ts");
|
||||
time_t time = std::time(NULL);
|
||||
|
||||
if (iterator != ircMessage.tags().end())
|
||||
|
@ -39,8 +39,11 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
|
|||
strftime(timeStampBuffer, 69, "%H:%M:%S", localtime(&time));
|
||||
QString timestampWithSeconds = QString(timeStampBuffer);
|
||||
|
||||
words->append(new Word(timestamp, Word::TimestampNoSeconds));
|
||||
words->append(new Word(timestampWithSeconds, Word::TimestampWithSeconds));
|
||||
QString copytext("");
|
||||
QString tooltip("");
|
||||
|
||||
// words->append(*new Word(timestamp, Word::TimestampNoSeconds, copytext, tooltip));
|
||||
// words->append(*new Word(timestampWithSeconds, Word::TimestampWithSeconds, copytext, tooltip));
|
||||
|
||||
// username
|
||||
m_userName = ircMessage.account();
|
||||
|
@ -58,7 +61,7 @@ Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel)
|
|||
// display name
|
||||
QString displayName;
|
||||
|
||||
auto iterator = ircMessage.tags().find("display-name");
|
||||
iterator = ircMessage.tags().find("display-name");
|
||||
if (iterator == ircMessage.tags().end()) {
|
||||
displayName = m_userName;
|
||||
}
|
||||
|
|
1
word.cpp
1
word.cpp
|
@ -22,6 +22,7 @@ Word::Word(const QString& text, Type type, const QString& copytext, const QStrin
|
|||
|
||||
Word::~Word()
|
||||
{
|
||||
delete text;
|
||||
delete m_copyText;
|
||||
delete m_tooltip;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue