Temporarily hidden buffers incorrectly unhidden on "other" activity
Steps
- Connect to core
- Temporarily hide a channel
- In this case, join/part/quit/nick are not filtered, but that shouldn't matter
- Have another nick join/part/quit/nick change in that channel without any new messages
Expected
Temporarily hidden channel remains hidden, as per desktop Quassel.
Actual
Temporarily hidden channel unhides on "other" activity.
Additional
Appears to be a regression in the course of fixing #62 (closed) , in commit 59f17b7a .
The buffer unhiding code right now checks for any type of activity.
if (activity != 0) {
Instead, this should mimic the unhiding code in Quassel desktop, which requires greater than other activity.
// add the buffer if...
if (config()->isInitialized()
&& !config()->removedBuffers().contains(bufferId) // it hasn't been manually removed and either
&& ((config()->addNewBuffersAutomatically() && !config()->temporarilyRemovedBuffers().contains(bufferId)) // is totally unknown to us (a new buffer)...
|| (config()->temporarilyRemovedBuffers().contains(bufferId) && activityLevel > BufferInfo::OtherActivity))) { // or was just temporarily hidden and has a new message waiting for us.
addBuffer(bufferId);
}
Specifically, config()->temporarilyRemovedBuffers().contains(bufferId) && activityLevel > BufferInfo::OtherActivity
.
It's worthwhile checking that the other behaviors in QuasselDroid match as expected, too.