diff --git a/CHANGELOG.md b/CHANGELOG.md index 833e89630..33a7ea08b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +Tiny posting cooldown adjustment: + - You can post an image reply immediately after a non-image reply. + ### 3.11.3 - *2013-09-19* Update posting cooldown timers to match 4chan settings: diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index ca0ce1dbe..306907940 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -259,11 +259,11 @@ QR = if delay cooldown = {delay} else - if post.file + if hasFile = !!post.file upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND) QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2 QR.cooldown.upSpd = upSpd - cooldown = {isReply, threadID} + cooldown = {isReply, hasFile, threadID} QR.cooldown.cooldowns[start] = cooldown $.set "cooldown.#{g.BOARD}", QR.cooldown.cooldowns QR.cooldown.start() @@ -310,12 +310,16 @@ QR = # reply cooldown with a reply, thread cooldown with a thread elapsed = Math.floor (now - start) / $.SECOND continue if elapsed < 0 # clock changed since then? - type = unless isReply - 'thread' + unless isReply + type = 'thread' else if hasFile - 'image' + # You can post an image reply immediately after a non-image reply. + unless cooldown.hasFile + seconds = Math.max seconds, 0 + continue + type = 'image' else - 'reply' + type = 'reply' maxTimer = Math.max types[type] or 0, types[type + '_intra'] or 0 unless start <= now <= start + maxTimer * $.SECOND QR.cooldown.unset start