From 1f11293ac9554cc1a0c8e71f22f06d7251797af8 Mon Sep 17 00:00:00 2001 From: Maxime Poulin Date: Sun, 24 Jul 2016 01:50:15 -0400 Subject: [PATCH] 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. --- client/js/lounge.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/js/lounge.js b/client/js/lounge.js index 133dd4d4..1b8a838c 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -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");