Newer
Older
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
var ContentUpdater = {
addPostToStream: function(html) {
var postGUID = $(streamElement).attr('id');
if($("#"+postGUID).length === 0) {
if($("#no_posts").length) {
streamElement.prependTo("#main_stream:not('.show')").fadeIn("fast", function() {
Diaspora.widgets.publish("stream/postAdded", [postGUID]);
Diaspora.widgets.timeago.updateTimeAgo();
Diaspora.widgets.directionDetector.updateBinds();
}
},
addLikesToPost: function(postGUID, html) {
var post = $("#" + postGUID);
$(".likes_container", post)
.fadeOut("fast")
.html(html)
.fadeIn("fast");