mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
minor fixes in ChatAction's creation/processing
This commit is contained in:
parent
ba4d877b89
commit
465da29a43
|
@ -216,8 +216,9 @@ void ChatForm::onFileRecvRequest(ToxFile file)
|
|||
previousId = friendId;
|
||||
}
|
||||
|
||||
chatWidget->insertMessage(ChatActionPtr(new FileTransferAction(fileTrans, getElidedName(name),
|
||||
QTime::currentTime().toString("hh:mm"), false)));
|
||||
QString dateStr = QTime::currentTime().toString(Settings::getInstance().getTimestampFormat());
|
||||
FileTransferAction *fa = new FileTransferAction(fileTrans, getElidedName(name), dateStr, false);
|
||||
chatWidget->insertMessage(ChatActionPtr(fa));
|
||||
|
||||
if (!Settings::getInstance().getAutoAcceptDir(f->getToxID()).isEmpty()
|
||||
|| Settings::getInstance().getAutoSaveEnabled())
|
||||
|
|
|
@ -229,7 +229,9 @@ void GenericChatForm::addAlertMessage(const ToxID &author, QString message, QDat
|
|||
authorStr = author.publicKey;
|
||||
|
||||
QString date = datetime.toString(Settings::getInstance().getTimestampFormat());
|
||||
chatWidget->insertMessage(ChatActionPtr(new AlertAction(authorStr, message, date)));
|
||||
MessageActionPtr ca = MessageActionPtr(new AlertAction(authorStr, message, date));
|
||||
ca->markAsSent();
|
||||
chatWidget->insertMessage(ca);
|
||||
previousId = author;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user