projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mark post as loaded when the AJAX reply has arrived.
[Sone.git]
/
src
/
main
/
resources
/
static
/
javascript
/
sone.js
diff --git
a/src/main/resources/static/javascript/sone.js
b/src/main/resources/static/javascript/sone.js
index
69c11e0
..
b44f19e
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-677,8
+677,11
@@
function loadNewPost(postId) {
if (postId in loadedPosts) {
return;
}
if (postId in loadedPosts) {
return;
}
- loadedPosts[postId] = true;
$.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
$.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
+ if (postId in loadedPosts) {
+ return;
+ }
+ loadedPosts[postId] = true;
if ((data != null) && data.success) {
if (!isIndexPage() && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) {
return;
if ((data != null) && data.success) {
if (!isIndexPage() && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) {
return;
@@
-707,8
+710,11
@@
function loadNewReply(replyId) {
if (replyId in loadedReplies) {
return;
}
if (replyId in loadedReplies) {
return;
}
- loadedReplies[replyId] = true;
$.getJSON("getReply.ajax", { "reply": replyId }, function(data, textStatus) {
$.getJSON("getReply.ajax", { "reply": replyId }, function(data, textStatus) {
+ if (replyId in loadedReplies) {
+ return;
+ }
+ loadedReplies[replyId] = true;
/* find post. */
if ((data != null) && data.success) {
$("#sone .post#" + data.reply.postId).each(function() {
/* find post. */
if ((data != null) && data.success) {
$("#sone .post#" + data.reply.postId).each(function() {