instantiate StreamElement widget after a post has been added to the stream by a user. time to clean publisher.js up. gross.

This commit is contained in:
Dan Hansen 2011-08-22 20:11:56 -05:00
parent 6b040c7b4a
commit 049efae1a6
2 changed files with 6 additions and 3 deletions

View file

@ -42,7 +42,7 @@ var ContentUpdater = {
$(html).appendTo(comments).fadeIn("fast");
Diaspora.page.timeAgo.updateTimeAgo();
Diaspora.page.directionDetector.updateBinds();
Diaspora.page.directionDetector.updateBinds()
},
addLikesToPost: function(postGUID, html) {

View file

@ -381,13 +381,16 @@ var Publisher = {
isPostVisible = true;
});
if(isPostVisible)
if(isPostVisible) {
ContentUpdater.addPostToStream(json.html);
else
Diaspora.page.stream.addPost($("#" + json.post_id));
}
else {
Diaspora.widgets.flashMessages.render({
success: true,
message: Diaspora.I18n.t('successfully_posted_message_to_an_aspects_that_is_not_visible')
});
}
//collapse publisher
Publisher.close();