1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
PKEv 2015-03-22 02:23:35 +03:00
parent d33f87772d
commit becd923c09
2 changed files with 5 additions and 10 deletions

View File

@ -35,6 +35,11 @@ Friend::Friend(int FriendId, const ToxID &UserId)
widget = new FriendWidget(friendId, getDisplayedName());
chatForm = new ChatForm(this);
if (Settings::getInstance().getEnableLogging())
{
chatForm->loadHistory(QDateTime::currentDateTime().addDays(-7), true);
widget->historyLoaded = true;
}
}
Friend::~Friend()

View File

@ -130,16 +130,6 @@ void FriendWidget::setAsActiveChatroom()
if (isDefaultAvatar)
avatar->setPixmap(QPixmap(":img/contact_dark.svg"), Qt::transparent);
if(!historyLoaded)
{
Friend* f = FriendList::findFriend(friendId);
if (Settings::getInstance().getEnableLogging())
{
f->getChatForm()->loadHistory(QDateTime::currentDateTime().addDays(-7), true);
historyLoaded = true;
}
}
}
void FriendWidget::setAsInactiveChatroom()