From a41a05de317403cdf155bf8df7862aefc8f5c56e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 25 Oct 2017 20:48:45 +0900 Subject: Fix #89 --- src/web/app/desktop/tags/timeline.tag | 30 +++++++++++++++++++----------- src/web/app/desktop/tags/ui.tag | 32 ++++++++++++++++++-------------- src/web/app/mobile/tags/timeline.tag | 30 +++++++++++++++++++----------- src/web/app/mobile/tags/ui.tag | 2 +- 4 files changed, 57 insertions(+), 37 deletions(-) (limited to 'src/web/app') diff --git a/src/web/app/desktop/tags/timeline.tag b/src/web/app/desktop/tags/timeline.tag index cd7ac7d207..2d6b439e38 100644 --- a/src/web/app/desktop/tags/timeline.tag +++ b/src/web/app/desktop/tags/timeline.tag @@ -424,6 +424,7 @@ import compile from '../../common/scripts/text-compiler'; import dateStringify from '../../common/scripts/date-stringify'; + this.mixin('i'); this.mixin('api'); this.mixin('stream'); this.mixin('user-preview'); @@ -462,24 +463,31 @@ }; this.capture = withHandler => { - this.stream.send({ - type: 'capture', - id: this.post.id - }); - if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated); + if (this.SIGNIN) { + this.stream.send({ + type: 'capture', + id: this.post.id + }); + if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated); + } }; this.decapture = withHandler => { - this.stream.send({ - type: 'decapture', - id: this.post.id - }); - if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated); + if (this.SIGNIN) { + this.stream.send({ + type: 'decapture', + id: this.post.id + }); + if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated); + } }; this.on('mount', () => { this.capture(true); - this.stream.on('_connected_', this.onStreamConnected); + + if (this.SIGNIN) { + this.stream.on('_connected_', this.onStreamConnected); + } if (this.p.text) { const tokens = this.p.ast; diff --git a/src/web/app/desktop/tags/ui.tag b/src/web/app/desktop/tags/ui.tag index fce0743ff7..e0d7393b08 100644 --- a/src/web/app/desktop/tags/ui.tag +++ b/src/web/app/desktop/tags/ui.tag @@ -5,7 +5,7 @@
- +