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/mobile/tags/timeline.tag | 30 +++++++++++++++++++----------- src/web/app/mobile/tags/ui.tag | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) (limited to 'src/web/app/mobile') diff --git a/src/web/app/mobile/tags/timeline.tag b/src/web/app/mobile/tags/timeline.tag index 5ecc2df9d1..c7f5bfd681 100644 --- a/src/web/app/mobile/tags/timeline.tag +++ b/src/web/app/mobile/tags/timeline.tag @@ -467,6 +467,7 @@ import getPostSummary from '../../../../common/get-post-summary.ts'; import openPostForm from '../scripts/open-post-form'; + this.mixin('i'); this.mixin('api'); this.mixin('stream'); @@ -502,24 +503,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/mobile/tags/ui.tag b/src/web/app/mobile/tags/ui.tag index b2f738dc2e..9d9cd4d74a 100644 --- a/src/web/app/mobile/tags/ui.tag +++ b/src/web/app/mobile/tags/ui.tag @@ -4,7 +4,7 @@
- +