From 4d7dfdf85cd36386324357274665a5850c1ff296 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 133dd4d469..c89ce85a74 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(lastActive.find(".messages")); + var chan = $(target) .addClass("active") .trigger("show");