From 652d083766a4a0b11151fe1f196a49da533d6349 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 29 Jun 2021 07:49:19 +0000 Subject: implement removing of notifications/preview-messages of deleted items --- view/js/main.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 9ab66833c..9ef81b72c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1274,7 +1274,7 @@ function dopin(id) { }); } -function dropItem(url, object) { +function dropItem(url, object, b64mid) { var confirm = confirmDelete(); if(confirm) { var id = url.split('/')[2]; @@ -1286,11 +1286,18 @@ function dropItem(url, object) { $('body').css('cursor', 'auto'); }); - if($('#wall-item-pinned-' + id).length) + if($('#wall-item-pinned-' + id).length) { $.post('pin/pin', { 'id' : id }); + } + + if (typeof b64mid !== typeof undefined) { + $('[data-b64mid=\'' + b64mid + '\']').fadeOut(function() { + this.remove(); + }); + } return true; - } + } else { return false; } -- cgit v1.2.3