aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-29 09:53:40 +0000
committerMario <mario@mariovavti.com>2021-06-29 09:53:40 +0000
commit197d15b7de34c670934cfe873e7c67233e090009 (patch)
tree5ca4b4f2bc426747cc22ab2d6c52720aedbd91ce
parentbb5f6a1d79217222363bf803125278b05049d2b6 (diff)
downloadvolse-hubzilla-197d15b7de34c670934cfe873e7c67233e090009.tar.gz
volse-hubzilla-197d15b7de34c670934cfe873e7c67233e090009.tar.bz2
volse-hubzilla-197d15b7de34c670934cfe873e7c67233e090009.zip
only remove elements after the delete has happened
-rw-r--r--view/js/main.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 9ef81b72c..f427df8ad 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1284,18 +1284,18 @@ function dropItem(url, object, b64mid) {
$.get(url, function() {
$(object + ', #pinned-wrapper-' + id).remove();
$('body').css('cursor', 'auto');
+
+ if (typeof b64mid !== typeof undefined) {
+ $('[data-b64mid=\'' + b64mid + '\']').fadeOut(function() {
+ this.remove();
+ });
+ }
});
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 {