This commit is contained in:
Jeena Paradies 2013-01-07 00:43:04 +01:00
parent fee541fd1d
commit e07fa926b8
7 changed files with 62 additions and 25 deletions

View file

@ -62,10 +62,8 @@ function(Core, Paths, HostApp, URI) {
} else if (status.type == "https://tent.io/types/post/delete/v0.1.0") {
var li = document.getElementById("post-" + status.content.id);
if (li) {
this.body.removeChild(li);
}
HostApp.notificateViewsAboutDeletedPost(status.content.id, status.entity);
} else if (status.type == "https://tent.io/types/post/repost/v0.1.0") {
this.getRepost(status, this.body.firstChild);

View file

@ -747,6 +747,13 @@ function(jQuery, Paths, URI, HostApp, Cache) {
HostApp.openNewMessageWidow(entity, status_id, string, is_private);
}
Core.prototype.postDeleted = function(post_id, entity) {
var li = document.getElementById("post-" + post_id);
if (li) {
this.body.removeChild(li);
}
};
return Core;
});

View file

@ -132,6 +132,14 @@ define(function() {
return OS_TYPE == "mac" ? "OS X" : "Linux";
}
HostApp.notificateViewsAboutDeletedPost = function(postId, entity) {
if (OS_TYPE == "mac") {
controller.notificateViewsAboutDeletedPostWithId_byEntity_(postId, entity);
} else {
controller.notificateViewsAboutDeletedPostWithIdbyEntity(postId, entity);
}
}
return HostApp;
});