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") .find(".chat")
.unsticky(); .unsticky();
lastActive var lastActiveChan = lastActive
.find(".chan.active") .find(".chan.active")
.removeClass("active"); .removeClass("active");
lastActiveChan
.find(".unread-marker")
.appendTo(lastActiveChan.find(".messages"));
var chan = $(target) var chan = $(target)
.addClass("active") .addClass("active")
.trigger("show"); .trigger("show");