Browse Source

#1441 correct

pull/1452/head
PKEv 11 years ago
parent
commit
becd923c09
  1. 5
      src/friend.cpp
  2. 10
      src/widget/friendwidget.cpp

5
src/friend.cpp

@ -35,6 +35,11 @@ Friend::Friend(int FriendId, const ToxID &UserId) @@ -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()

10
src/widget/friendwidget.cpp

@ -130,16 +130,6 @@ void FriendWidget::setAsActiveChatroom() @@ -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()

Loading…
Cancel
Save