posts.put(post.getId(), post);
}
synchronized (newPosts) {
- knownPosts.add(post.getId());
+ newPosts.add(post.getId());
+ coreListenerManager.fireNewPostFound(post);
}
sone.addPost(post);
saveSone(sone);
replies.put(reply.getId(), reply);
}
synchronized (newReplies) {
- knownReplies.add(reply.getId());
+ newReplies.add(reply.getId());
+ coreListenerManager.fireNewReplyFound(reply);
}
sone.addReply(reply);
saveSone(sone);
sender = $(this).find(":input[name=sender]").val();
text = $(this).find(":input[name=text]:enabled").val();
$.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "sender": sender, "text": text }, function(data, textStatus) {
- if ((data != null) && data.success) {
- loadNewPost(data.postId, data.sone, data.recipient);
- }
button.removeAttr("disabled");
});
$(this).find(":input[name=sender]").val(getCurrentSoneId());
$("#sone #post-message").submit(function() {
sender = $(this).find(":input[name=sender]").val();
text = $(this).find(":input[name=text]:enabled").val();
- $.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "recipient": getShownSoneId(), "sender": sender, "text": text }, function(data, textStatus) {
- if ((data != null) && data.success) {
- loadNewPost(data.postId, getCurrentSoneId());
- }
- });
+ $.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "recipient": getShownSoneId(), "sender": sender, "text": text });
$(this).find(":input[name=sender]").val(getCurrentSoneId());
$(this).find(":input[name=text]:enabled").val("").blur();
$(this).find(".sender").hide();