Show More
@@ -138,7 +138,25 b' function updatePost(postHtml) {' | |||||
138 |
|
138 | |||
139 | type = POST_UPDATED; |
|
139 | type = POST_UPDATED; | |
140 | } else { |
|
140 | } else { | |
141 | post.appendTo(threadBlock); |
|
141 | var postPubTime = new Date(post.find('time').attr('datetime')); | |
|
142 | var allPosts = $('.post'); | |||
|
143 | var previousPost = null; | |||
|
144 | ||||
|
145 | allPosts.each(function(i) { | |||
|
146 | var curPost = $(this); | |||
|
147 | var curPostTime = new Date(curPost.find('time').attr('datetime')); | |||
|
148 | ||||
|
149 | if (i + 0 && curPostTime > postPubTime) { | |||
|
150 | previousPost = allPosts.get(i - 1); | |||
|
151 | return false; | |||
|
152 | }; | |||
|
153 | }); | |||
|
154 | ||||
|
155 | if (previousPost == null) { | |||
|
156 | previousPost = allPosts.last(); | |||
|
157 | } | |||
|
158 | ||||
|
159 | post.insertAfter(previousPost); | |||
142 |
|
160 | |||
143 | if (bottom) { |
|
161 | if (bottom) { | |
144 | scrollToBottom(); |
|
162 | scrollToBottom(); |
General Comments 0
You need to be logged in to leave comments.
Login now