connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), this, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), _messageModel, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(bufferMarkedAsRead(BufferId)), SIGNAL(bufferMarkedAsRead(BufferId)));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), this, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(buffersPermanentlyMerged(BufferId, BufferId)), _messageModel, SLOT(buffersPermanentlyMerged(BufferId, BufferId)));
connect(bufferSyncer(), SIGNAL(bufferMarkedAsRead(BufferId)), SIGNAL(bufferMarkedAsRead(BufferId)));
- connect(networkModel(), SIGNAL(setLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &)));
+ connect(networkModel(), SIGNAL(requestSetLastSeenMsg(BufferId, MsgId)), bufferSyncer(), SLOT(requestSetLastSeenMsg(BufferId, const MsgId &)));
signalProxy()->synchronize(bufferSyncer());
// create a new BufferViewManager
Q_ASSERT(!_bufferViewManager);
_bufferViewManager = new ClientBufferViewManager(signalProxy(), this);
signalProxy()->synchronize(bufferSyncer());
// create a new BufferViewManager
Q_ASSERT(!_bufferViewManager);
_bufferViewManager = new ClientBufferViewManager(signalProxy(), this);
- connect(bufferViewManager(), SIGNAL(initDone()), this, SLOT(createDefaultBufferView()));
+ connect(_bufferViewManager, SIGNAL(initDone()), _bufferViewOverlay, SLOT(restore()));
// triggers this slot. But we have to make sure that we know all buffers yet.
// so we check the BufferSyncer and in case it wasn't initialized we wait for that instead
if(!bufferSyncer()->isInitialized()) {
// triggers this slot. But we have to make sure that we know all buffers yet.
// so we check the BufferSyncer and in case it wasn't initialized we wait for that instead
if(!bufferSyncer()->isInitialized()) {
- connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
+ disconnect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
connect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
return;
}
connect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
return;
}
- _backlogManager->requestInitialBacklog();
-}
+ disconnect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
+ disconnect(bufferSyncer(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
-void Client::createDefaultBufferView() {
- if(bufferViewManager()->bufferViewConfigs().isEmpty()) {
- BufferViewConfig config(-1);
- config.setBufferViewName(tr("All Chats"));
- config.initSetBufferList(networkModel()->allBufferIdsSorted());
- bufferViewManager()->requestCreateBufferView(config.toVariantMap());
- }
+ _backlogManager->requestInitialBacklog();
void Client::removeBuffer(BufferId id) {
if(!bufferSyncer()) return;
bufferSyncer()->requestRemoveBuffer(id);
void Client::removeBuffer(BufferId id) {
if(!bufferSyncer()) return;
bufferSyncer()->requestRemoveBuffer(id);