summaryrefslogtreecommitdiff
path: root/src/web/app/mobile
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-10-25 20:48:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-10-25 20:48:45 +0900
commita41a05de317403cdf155bf8df7862aefc8f5c56e (patch)
treec5d5ed1d4ff34777e7d9445fdbc757faf2a2311f /src/web/app/mobile
parentBetter English (diff)
downloadsharkey-a41a05de317403cdf155bf8df7862aefc8f5c56e.tar.gz
sharkey-a41a05de317403cdf155bf8df7862aefc8f5c56e.tar.bz2
sharkey-a41a05de317403cdf155bf8df7862aefc8f5c56e.zip
Fix #89
Diffstat (limited to 'src/web/app/mobile')
-rw-r--r--src/web/app/mobile/tags/timeline.tag30
-rw-r--r--src/web/app/mobile/tags/ui.tag2
2 files changed, 20 insertions, 12 deletions
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 @@
<div class="content">
<yield />
</div>
- <mk-stream-indicator/>
+ <mk-stream-indicator if={ SIGNIN }/>
<style>
:scope
display block