Fix #1347.
This commit is contained in:
parent
ce0c0c1623
commit
af21becff6
@ -1,3 +1,6 @@
|
|||||||
|
- Minor cooldown fix:
|
||||||
|
- You cannot post an image reply immediately after a non-image reply anymore.
|
||||||
|
|
||||||
## 3.14.0 - *2013-11-21*
|
## 3.14.0 - *2013-11-21*
|
||||||
|
|
||||||
- **New option**: `Auto-hide header on scroll`.
|
- **New option**: `Auto-hide header on scroll`.
|
||||||
|
|||||||
@ -262,11 +262,11 @@ QR =
|
|||||||
if delay
|
if delay
|
||||||
cooldown = {delay}
|
cooldown = {delay}
|
||||||
else
|
else
|
||||||
if hasFile = !!post.file
|
if post.file
|
||||||
upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND)
|
upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND)
|
||||||
QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2
|
QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2
|
||||||
QR.cooldown.upSpd = upSpd
|
QR.cooldown.upSpd = upSpd
|
||||||
cooldown = {isReply, hasFile, threadID}
|
cooldown = {isReply, threadID}
|
||||||
QR.cooldown.cooldowns[start] = cooldown
|
QR.cooldown.cooldowns[start] = cooldown
|
||||||
$.set "cooldown.#{g.BOARD}", QR.cooldown.cooldowns
|
$.set "cooldown.#{g.BOARD}", QR.cooldown.cooldowns
|
||||||
QR.cooldown.start()
|
QR.cooldown.start()
|
||||||
@ -308,16 +308,12 @@ QR =
|
|||||||
# reply cooldown with a reply, thread cooldown with a thread
|
# reply cooldown with a reply, thread cooldown with a thread
|
||||||
elapsed = Math.floor (now - start) / $.SECOND
|
elapsed = Math.floor (now - start) / $.SECOND
|
||||||
continue if elapsed < 0 # clock changed since then?
|
continue if elapsed < 0 # clock changed since then?
|
||||||
unless isReply
|
type = unless isReply
|
||||||
type = 'thread'
|
'thread'
|
||||||
else if hasFile
|
else if hasFile
|
||||||
# You can post an image reply immediately after a non-image reply.
|
'image'
|
||||||
unless cooldown.hasFile
|
|
||||||
seconds = Math.max seconds, 0
|
|
||||||
continue
|
|
||||||
type = 'image'
|
|
||||||
else
|
else
|
||||||
type = 'reply'
|
'reply'
|
||||||
maxTimer = Math.max types[type] or 0, types[type + '_intra'] or 0
|
maxTimer = Math.max types[type] or 0, types[type + '_intra'] or 0
|
||||||
unless start <= now <= start + maxTimer * $.SECOND
|
unless start <= now <= start + maxTimer * $.SECOND
|
||||||
QR.cooldown.unset start
|
QR.cooldown.unset start
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user