From 0610acbf6eef11a9a85cc35851150cb3cc072785 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 20 Mar 2017 13:54:59 +0900 Subject: #302 --- src/web/app/common/scripts/stream.js | 4 +++ src/web/app/common/tags/poll.tag | 15 ++++++---- src/web/app/desktop/tags/timeline-post.tag | 44 +++++++++++++++++++-------- src/web/app/mobile/tags/timeline-post.tag | 48 +++++++++++++++++++++--------- 4 files changed, 80 insertions(+), 31 deletions(-) (limited to 'src/web') diff --git a/src/web/app/common/scripts/stream.js b/src/web/app/common/scripts/stream.js index d6e6bf8aa5..cbdde8d2f2 100644 --- a/src/web/app/common/scripts/stream.js +++ b/src/web/app/common/scripts/stream.js @@ -44,6 +44,10 @@ class Connection { } } + send(message) { + this.socket.send(JSON.stringify(message)); + } + close() { this.socket.removeEventListener('open', this.onOpen); this.socket.removeEventListener('message', this.onMessage); diff --git a/src/web/app/common/tags/poll.tag b/src/web/app/common/tags/poll.tag index ce6460bce9..ce006e5e02 100644 --- a/src/web/app/common/tags/poll.tag +++ b/src/web/app/common/tags/poll.tag @@ -70,11 +70,16 @@ -- cgit v1.2.3-freya