/***************************************************************************
- * 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 *
#include "abstractbuffercontainer.h"
#include "client.h"
+#include "clientbacklogmanager.h"
#include "networkmodel.h"
AbstractBufferContainer::AbstractBufferContainer(QWidget *parent)
if(newBufferId != oldBufferId) {
setCurrentBuffer(newBufferId);
emit currentChanged(newBufferId);
+ emit currentChanged(current);
}
}
_currentBuffer = bufferId;
showChatView(bufferId);
- Client::networkModel()->setBufferActivity(bufferId, Buffer::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());
+ }
}