Reset the unread marker on channel change

This restores the old behavior of resetting the unread marker on channel change, as that's usually at this point one wants to check for new messages and is also what matches on the server. I feel this is overall more consistent and useful, and also more in line with what other clients do.
This commit is contained in:
Maxime Poulin 2016-07-24 01:50:15 -04:00
parent 179698887d
commit 1f11293ac9
No known key found for this signature in database
GPG key ID: CB63C36252F40D4B

View file

@ -764,10 +764,14 @@ $(function() {
.find(".chat")
.unsticky();
lastActive
var lastActiveChan = lastActive
.find(".chan.active")
.removeClass("active");
lastActiveChan
.find(".unread-marker")
.appendTo(lastActiveChan.find(".messages"));
var chan = $(target)
.addClass("active")
.trigger("show");