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

Fix the previous todo

This commit is contained in:
Dubslow 2015-02-02 17:56:51 -06:00
parent ca5e9c324d
commit 8d999efae7
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA
3 changed files with 8 additions and 1 deletions

View File

@ -99,7 +99,7 @@ bool PrivacyForm::setChatLogsPassword()
{
Settings::getInstance().setEncryptLogs(true);
HistoryKeeper::getInstance()->importMessages(oldMessages);
// TODO: The old encrypted history is loaded, but doesn't appear in the GUI. @apprb ?
Widget::getInstance()->reloadHistory();
delete dialog;
return true;
}

View File

@ -675,6 +675,12 @@ void Widget::setStatusMessage(const QString &statusMessage)
ui->statusLabel->setToolTip(statusMessage); // for overlength messsages
}
void Widget::reloadHistory()
{
for (auto f : FriendList::getAllFriends())
f->getChatForm()->loadHistory(QDateTime::currentDateTime().addDays(-7), true);
}
void Widget::addFriend(int friendId, const QString &userId)
{
//qDebug() << "Widget: Adding friend with id" << userId;

View File

@ -77,6 +77,7 @@ public:
virtual void resizeEvent(QResizeEvent *event);
void clearAllReceipts();
void reloadHistory();
void reloadTheme();