1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: adjust to changes in Friend and ToxPk classes

With this it compiles.
This commit is contained in:
Zetok Zalbavar 2017-01-27 00:59:29 +00:00
parent 3307fcd96f
commit 7168d2b858
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -221,7 +221,7 @@ void ChatForm::onTextEditChanged()
else else
{ {
isTyping = false; isTyping = false;
core->sendTyping(f->getFriendID(), isTyping); core->sendTyping(f->getFriendId(), isTyping);
} }
} }
@ -780,7 +780,7 @@ void ChatForm::loadHistory(QDateTime since, bool processUndelivered)
} }
History* history = Nexus::getProfile()->getHistory(); History* history = Nexus::getProfile()->getHistory();
QString pk = f->getToxId().getPublicKeyString(); QString pk = f->getPublicKey().toString();
QList<History::HistMessage> msgs = history->getChatHistory(pk, since, now); QList<History::HistMessage> msgs = history->getChatHistory(pk, since, now);
ToxPk storedPrevId = previousId; ToxPk storedPrevId = previousId;
@ -834,7 +834,7 @@ void ChatForm::loadHistory(QDateTime since, bool processUndelivered)
authorStr, messageText, type, isSelf, dateTime); authorStr, messageText, type, isSelf, dateTime);
uint prev = prevMsgDateTime.secsTo(msgDateTime); uint prev = prevMsgDateTime.secsTo(msgDateTime);
if (!isAction && prevId == authorId && prev < getChatLog()->repNameAfter) if (!isAction && prevId == authorPk && prev < getChatLog()->repNameAfter)
{ {
msg->hideSender(); msg->hideSender();
} }
@ -1164,8 +1164,8 @@ void ChatForm::SendMessageStr(QString msg)
if (profile->isHistoryEnabled()) if (profile->isHistoryEnabled())
{ {
auto* offMsgEngine = getOfflineMsgEngine(); auto* offMsgEngine = getOfflineMsgEngine();
QString selfPk = Core::getInstance()->getSelfId().publicKey; QString selfPk = Core::getInstance()->getSelfId().toString();
QString pk = f->getToxId().getPublicKeyString(); QString pk = f->getPublicKey().toString();
QString name = Core::getInstance()->getUsername(); QString name = Core::getInstance()->getUsername();
profile->getHistory()->addNewMessage( profile->getHistory()->addNewMessage(
pk, qt_msg_hist, selfPk, timestamp, status, pk, qt_msg_hist, selfPk, timestamp, status,