# HG changeset patch # User neko259 # Date 2015-04-02 12:05:45 # Node ID 7609c9201bb4b1a1fe3856ea5195aa192afec862 # Parent 5583a4cbf3a53917825d44f9f6d261e0534c79c6 Don't update metadata panel on thread opening diff --git a/boards/static/js/thread_update.js b/boards/static/js/thread_update.js --- a/boards/static/js/thread_update.js +++ b/boards/static/js/thread_update.js @@ -87,12 +87,14 @@ function getThreadDiff() { $.getJSON(diffUrl) .success(function(data) { var addedPosts = data.added; + var hasMetaUpdates = false; for (var i = 0; i < addedPosts.length; i++) { var postText = addedPosts[i]; var post = $(postText); - updatePost(post) + updatePost(post); + hasMetaUpdates = true; } var updatedPosts = data.updated; @@ -101,10 +103,13 @@ function getThreadDiff() { var postText = updatedPosts[i]; var post = $(postText); - updatePost(post) + updatePost(post); + hasMetaUpdates = true; } - updateMetadataPanel(); + if (hasMetaUpdates) { + updateMetadataPanel(); + } // TODO Process removed posts if any $('.metapanel').attr('data-last-update', data.last_update);