left sidebar: Remove broken animation for new PMs.

When new PMs came in, we would do a little
animation to show you the incoming message.
Unfortunately, it was broken and would animate
too many things.  (The code looks at a single
var to see if PM counts changed, but there are
actually mulitple PM counts.  We could fix that,
but we decided that this feature just isn't
worth the complexity.)

We still animate incoming mentions.

Fixes #11868.
This commit is contained in:
Steve Howell 2019-03-15 18:39:55 +00:00 committed by Tim Abbott
parent 243be91a9b
commit 0c029fa3df
3 changed files with 0 additions and 13 deletions

View File

@ -256,8 +256,6 @@ run_test('update_dom_with_unread_counts', () => {
assert.equal(count, 10); assert.equal(count, 10);
}; };
unread_ui.animate_private_message_changes = function () {};
pm_list.update_dom_with_unread_counts(counts); pm_list.update_dom_with_unread_counts(counts);
assert(toggle_button_set); assert(toggle_button_set);

View File

@ -216,9 +216,6 @@ exports.update_dom_with_unread_counts = function (counts) {
unread_ui.set_count_toggle_button($("#userlist-toggle-unreadcount"), unread_ui.set_count_toggle_button($("#userlist-toggle-unreadcount"),
counts.private_message_count); counts.private_message_count);
unread_ui.animate_private_message_changes(get_filter_li(),
counts.private_message_count);
}; };

View File

@ -2,7 +2,6 @@ var unread_ui = (function () {
var exports = {}; var exports = {};
var last_private_message_count = 0;
var last_mention_count = 0; var last_mention_count = 0;
function do_new_messages_animation(li) { function do_new_messages_animation(li) {
@ -18,13 +17,6 @@ function do_new_messages_animation(li) {
setTimeout(end_animation, 6000); setTimeout(end_animation, 6000);
} }
exports.animate_private_message_changes = function (li, new_private_message_count) {
if (new_private_message_count > last_private_message_count) {
do_new_messages_animation(li);
}
last_private_message_count = new_private_message_count;
};
exports.animate_mention_changes = function (li, new_mention_count) { exports.animate_mention_changes = function (li, new_mention_count) {
if (new_mention_count > last_mention_count) { if (new_mention_count > last_mention_count) {
do_new_messages_animation(li); do_new_messages_animation(li);