foreach(BufferId id, lastSeenHash.keys())
_bufferSyncer->requestSetLastSeenMsg(id, lastSeenHash[id]);
- connect(_bufferSyncer, SIGNAL(lastSeenMsgSet(BufferId, MsgId)), this, SLOT(storeBufferLastSeenMsg(BufferId, MsgId)));
+ connect(&(Core::instance()->syncTimer()), SIGNAL(timeout()), _bufferSyncer, SLOT(storeDirtyIds()));
p->synchronize(_bufferSyncer);
}
void CoreSession::saveSessionState() const {
+ _bufferSyncer->storeDirtyIds();
}
void CoreSession::restoreSessionState() {
return v;
}
-void CoreSession::storeBufferLastSeenMsg(BufferId buffer, const MsgId &msgId) {
- Core::setBufferLastSeenMsg(user(), buffer, msgId);
-}
-
void CoreSession::initScriptEngine() {
signalProxy()->attachSlot(SIGNAL(scriptRequest(QString)), this, SLOT(scriptRequest(QString)));
signalProxy()->attachSignal(this, SIGNAL(scriptResult(QString)));
}
void CoreSession::renameBuffer(const NetworkId &networkId, const QString &newName, const QString &oldName) {
- BufferInfo bufferInfo = Core::bufferInfo(user(), networkId, BufferInfo::QueryBuffer, oldName);
+ BufferInfo bufferInfo = Core::bufferInfo(user(), networkId, BufferInfo::QueryBuffer, oldName, false);
_bufferSyncer->renameBuffer(bufferInfo.bufferId(), newName);
}