message_edit: Fix timer text not decrementing.

This fixes a regression introduced in e6369fc, where we simply lost the `--` part.

Fixes #3720.
This commit is contained in:
Philip Skomorokhov
2017-02-21 08:41:07 +03:00
committed by Tim Abbott
parent 20f9c04ab5
commit 7a75ed9c4a

View File

@@ -244,7 +244,8 @@ function edit_message(row, raw_content) {
// since otherwise there is a noticeable lag // since otherwise there is a noticeable lag
message_edit_countdown_timer.text(timer_text(seconds_left)); message_edit_countdown_timer.text(timer_text(seconds_left));
var countdown_timer = setInterval(function () { var countdown_timer = setInterval(function () {
if (seconds_left - 1 <= 0) { seconds_left -= 1;
if (seconds_left <= 0) {
clearInterval(countdown_timer); clearInterval(countdown_timer);
message_edit_content.prop("readonly", "readonly"); message_edit_content.prop("readonly", "readonly");
if (message.type === 'stream') { if (message.type === 'stream') {