X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.cpp;h=7be93f0d2c8abbfe386ebf380c904ce96b10e3b0;hp=c4cbb19788838525731a5814ab5536c9d1636dcc;hb=2cdbd53254371cd538a1437c39d22422249fea1a;hpb=50d5627b282f063e755f44f02a74aeddd1d07538 diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index c4cbb197..7be93f0d 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel IRC Team * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,6 +20,7 @@ #include "abstractbuffercontainer.h" #include "client.h" +#include "clientbacklogmanager.h" #include "networkmodel.h" AbstractBufferContainer::AbstractBufferContainer(QWidget *parent) @@ -71,6 +72,7 @@ void AbstractBufferContainer::currentChanged(const QModelIndex ¤t, const Q if(newBufferId != oldBufferId) { setCurrentBuffer(newBufferId); emit currentChanged(newBufferId); + emit currentChanged(current); } } @@ -91,7 +93,11 @@ void AbstractBufferContainer::setCurrentBuffer(BufferId bufferId) { _currentBuffer = bufferId; showChatView(bufferId); - Client::networkModel()->setBufferActivity(bufferId, BufferInfo::NoActivity); - Client::setBufferLastSeenMsg(bufferId, _chatViews[bufferId]->lastMsgId()); + Client::networkModel()->clearBufferActivity(bufferId); + Client::backlogManager()->checkForBacklog(bufferId); setFocus(); + + if(bufferId.isValid() && _chatViews.contains(bufferId)) { + Client::setBufferLastSeenMsg(bufferId, _chatViews[bufferId]->lastMsgId()); + } }