fixes #86
This commit is contained in:
parent
fee541fd1d
commit
e07fa926b8
7 changed files with 62 additions and 25 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
});
|
|
@ -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;
|
||||
|
||||
});
|
Reference in a new issue