Prevent a post from being killed twice,
f.e. when the thread updater udpdates the post before we get an answer from the server.
This commit is contained in:
parent
98e46dd430
commit
1e34674fdf
@ -158,10 +158,12 @@ class Post
|
||||
kill: (file, now) ->
|
||||
now or= new Date()
|
||||
if file
|
||||
return if @file.isDead
|
||||
@file.isDead = true
|
||||
@file.timeOfDeath = now
|
||||
$.addClass @nodes.root, 'deleted-file'
|
||||
else
|
||||
return if @isDead
|
||||
@isDead = true
|
||||
@timeOfDeath = now
|
||||
$.addClass @nodes.root, 'deleted-post'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user