Skip to content

Commit

Permalink
Reset the unread marker on channel change
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maxpoulin64 committed Jul 24, 2016
1 parent 1796988 commit 4d7dfdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/js/lounge.js
Expand Up @@ -764,10 +764,14 @@ $(function() {
.find(".chat")
.unsticky();

lastActive
var lastActiveChan = lastActive
.find(".chan.active")
.removeClass("active");

lastActiveChan
.find(".unread-marker")
.appendTo(lastActive.find(".messages"));

var chan = $(target)
.addClass("active")
.trigger("show");
Expand Down

0 comments on commit 4d7dfdf

Please sign in to comment.