This commit is contained in:
syuilo 2018-02-23 04:07:22 +09:00
parent 0247200596
commit 4cbbaf3f77
3 changed files with 19 additions and 8 deletions

View file

@ -142,8 +142,10 @@ export default Vue.extend({
}
},
created() {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
if ((this as any).os.isSignedIn) {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
}
},
mounted() {
this.capture(true);
@ -154,8 +156,11 @@ export default Vue.extend({
},
beforeDestroy() {
this.decapture(true);
this.connection.off('_connected_', this.onStreamConnected);
(this as any).os.stream.dispose(this.connectionId);
if ((this as any).os.isSignedIn) {
this.connection.off('_connected_', this.onStreamConnected);
(this as any).os.stream.dispose(this.connectionId);
}
},
methods: {
capture(withHandler = false) {

View file

@ -115,8 +115,10 @@ export default Vue.extend({
}
},
created() {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
if ((this as any).os.isSignedIn) {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
}
},
mounted() {
this.capture(true);
@ -127,8 +129,11 @@ export default Vue.extend({
},
beforeDestroy() {
this.decapture(true);
this.connection.off('_connected_', this.onStreamConnected);
(this as any).os.stream.dispose(this.connectionId);
if ((this as any).os.isSignedIn) {
this.connection.off('_connected_', this.onStreamConnected);
(this as any).os.stream.dispose(this.connectionId);
}
},
methods: {
capture(withHandler = false) {

View file

@ -65,6 +65,7 @@ export default Vue.extend({
.mk-ui
display flex
flex 1
flex-direction column
padding-top 48px
> .content