Show More
@@ -87,12 +87,14 b' function getThreadDiff() {' | |||||
87 | $.getJSON(diffUrl) |
|
87 | $.getJSON(diffUrl) | |
88 | .success(function(data) { |
|
88 | .success(function(data) { | |
89 | var addedPosts = data.added; |
|
89 | var addedPosts = data.added; | |
|
90 | var hasMetaUpdates = false; | |||
90 |
|
91 | |||
91 | for (var i = 0; i < addedPosts.length; i++) { |
|
92 | for (var i = 0; i < addedPosts.length; i++) { | |
92 | var postText = addedPosts[i]; |
|
93 | var postText = addedPosts[i]; | |
93 | var post = $(postText); |
|
94 | var post = $(postText); | |
94 |
|
95 | |||
95 | updatePost(post) |
|
96 | updatePost(post); | |
|
97 | hasMetaUpdates = true; | |||
96 | } |
|
98 | } | |
97 |
|
99 | |||
98 | var updatedPosts = data.updated; |
|
100 | var updatedPosts = data.updated; | |
@@ -101,10 +103,13 b' function getThreadDiff() {' | |||||
101 | var postText = updatedPosts[i]; |
|
103 | var postText = updatedPosts[i]; | |
102 | var post = $(postText); |
|
104 | var post = $(postText); | |
103 |
|
105 | |||
104 | updatePost(post) |
|
106 | updatePost(post); | |
|
107 | hasMetaUpdates = true; | |||
105 | } |
|
108 | } | |
106 |
|
109 | |||
107 | updateMetadataPanel(); |
|
110 | if (hasMetaUpdates) { | |
|
111 | updateMetadataPanel(); | |||
|
112 | } | |||
108 |
|
113 | |||
109 | // TODO Process removed posts if any |
|
114 | // TODO Process removed posts if any | |
110 | $('.metapanel').attr('data-last-update', data.last_update); |
|
115 | $('.metapanel').attr('data-last-update', data.last_update); |
General Comments 0
You need to be logged in to leave comments.
Login now