X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.cpp;h=8fa435139eeb8dd684a9bbae71e7a123ee1828cd;hp=7be93f0d2c8abbfe386ebf380c904ce96b10e3b0;hb=d233de84d30fec0d32c6a464b1b457cf2d1ce4e3;hpb=9905ef8d4e5af6bb38368e7d694b6e1ccc09e21c diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index 7be93f0d..8fa43513 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -79,7 +79,10 @@ void AbstractBufferContainer::currentChanged(const QModelIndex ¤t, const Q void AbstractBufferContainer::setCurrentBuffer(BufferId bufferId) { BufferId prevBufferId = currentBuffer(); if(prevBufferId.isValid() && _chatViews.contains(prevBufferId)) { - Client::setBufferLastSeenMsg(prevBufferId, _chatViews[prevBufferId]->lastMsgId()); + MsgId msgId = _chatViews.value(prevBufferId)->lastMsgId(); + Client::setBufferLastSeenMsg(prevBufferId, msgId); + if(autoSetMarkerLine()) + Client::setBufferMarkerLine(prevBufferId, msgId); } if(!bufferId.isValid()) { @@ -94,10 +97,7 @@ void AbstractBufferContainer::setCurrentBuffer(BufferId bufferId) { _currentBuffer = bufferId; showChatView(bufferId); Client::networkModel()->clearBufferActivity(bufferId); + Client::setBufferLastSeenMsg(bufferId, _chatViews[bufferId]->lastMsgId()); Client::backlogManager()->checkForBacklog(bufferId); setFocus(); - - if(bufferId.isValid() && _chatViews.contains(bufferId)) { - Client::setBufferLastSeenMsg(bufferId, _chatViews[bufferId]->lastMsgId()); - } }