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:
Nicolas Stepien 2013-04-03 02:44:49 +02:00
parent 98e46dd430
commit 1e34674fdf

View File

@ -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'