##// END OF EJS Templates
Add new posts title to the title only if there are any
neko259 -
r1089:e299d6db default
parent child Browse files
Show More
@@ -92,19 +92,19 b' function getThreadDiff() {'
92 $.getJSON(diffUrl)
92 $.getJSON(diffUrl)
93 .success(function(data) {
93 .success(function(data) {
94 var addedPosts = data.added;
94 var addedPosts = data.added;
95 var hasMetaUpdates = false;
96
95
97 for (var i = 0; i < addedPosts.length; i++) {
96 for (var i = 0; i < addedPosts.length; i++) {
98 var postText = addedPosts[i];
97 var postText = addedPosts[i];
99 var post = $(postText);
98 var post = $(postText);
100
99
101 updatePost(post);
100 updatePost(post);
102 hasMetaUpdates = true;
103 }
101 }
104
102
105 var addedPostsCount = addedPosts.length;
103 var addedPostsCount = addedPosts.length;
106 updateBumplimitProgress(addedPostsCount);
104 if (addedPostsCount > 0) {
107 showNewPostsTitle(addedPostsCount);
105 updateBumplimitProgress(addedPostsCount);
106 showNewPostsTitle(addedPostsCount);
107 }
108
108
109 var updatedPosts = data.updated;
109 var updatedPosts = data.updated;
110
110
@@ -113,9 +113,9 b' function getThreadDiff() {'
113 var post = $(postText);
113 var post = $(postText);
114
114
115 updatePost(post);
115 updatePost(post);
116 hasMetaUpdates = true;
117 }
116 }
118
117
118 var hasMetaUpdates = addedPostsCount > 0 || updatedPosts.length > 0;
119 if (hasMetaUpdates) {
119 if (hasMetaUpdates) {
120 updateMetadataPanel();
120 updateMetadataPanel();
121 }
121 }
General Comments 0
You need to be logged in to leave comments. Login now