Retains Channel UnHiddens Status after client Restart.
authorramz <ramzthecoder@gmail.com>
Sun, 30 Mar 2014 11:07:25 +0000 (22:07 +1100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 14 Sep 2014 14:41:15 +0000 (16:41 +0200)
Steps to Reproduce:
1. Hide channel temporarily
2. Part channel
3. Join channel (it will now be visible again, at the bottom of that network's buffer list)
Optional: talk in the channel, get other people to talk, etc but the buffer must not be blue (new message(s)) when you proceed next
4. Quit the client
5. When you'll restart it, the channel will be temporarily hidden again

Root Cause:
After step 3, we are not saving the bufferviewconfig synchronizable object right.

Fix:
Save the bufferviewconfig object correctly.

Fixes #1218.

src/client/clientuserinputhandler.cpp

index 2a323ed..2f89081 100644 (file)
@@ -129,7 +129,7 @@ void ClientUserInputHandler::switchBuffer(const NetworkId &networkId, const QStr
         QList<ClientBufferViewConfig *> bufferViewConfigList = clientBufferViewManager->clientBufferViewConfigs();
         foreach(ClientBufferViewConfig *bufferViewConfig, bufferViewConfigList) {
             if (bufferViewConfig->temporarilyRemovedBuffers().contains(newBufId)) {
         QList<ClientBufferViewConfig *> bufferViewConfigList = clientBufferViewManager->clientBufferViewConfigs();
         foreach(ClientBufferViewConfig *bufferViewConfig, bufferViewConfigList) {
             if (bufferViewConfig->temporarilyRemovedBuffers().contains(newBufId)) {
-                bufferViewConfig->addBuffer(newBufId, bufferViewConfig->bufferList().length());
+                bufferViewConfig->requestAddBuffer(newBufId, bufferViewConfig->bufferList().length());
                 //if (bufferViewConfig->sortAlphabetically()) {
                 // TODO we need to trigger a sort here, but can't reach the model required
                 // to get a bufferviewfilter, as the bufferviewmanager only managers configs
                 //if (bufferViewConfig->sortAlphabetically()) {
                 // TODO we need to trigger a sort here, but can't reach the model required
                 // to get a bufferviewfilter, as the bufferviewmanager only managers configs