From 81cabf3dd8c145bacce91492067b6fdd6594a22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 2 Mar 2014 16:04:45 +0100 Subject: [PATCH] Use PeriodicalExecutor's resume --- file/js/be.bastelstu.Chat.litcoffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file/js/be.bastelstu.Chat.litcoffee b/file/js/be.bastelstu.Chat.litcoffee index f84a031..7b03f34 100644 --- a/file/js/be.bastelstu.Chat.litcoffee +++ b/file/js/be.bastelstu.Chat.litcoffee @@ -446,7 +446,7 @@ load messages if the appropriate event arrives. be.bastelstu.wcf.nodePush.onDisconnect -> console.log 'Enabling periodic loading' do getMessages - pe.getMessages = new WCF.PeriodicalExecuter getMessages, v.config.reloadTime * 1e3 + do pe.getMessages.resume be.bastelstu.wcf.nodePush.onMessage 'be.bastelstu.chat.newMessage', getMessages be.bastelstu.wcf.nodePush.onMessage 'be.bastelstu.wcf.nodePush.tick60', getMessages