components: small order of elements change and a cleanup
This commit is contained in:
parent
88a384f13c
commit
298d32efed
2 changed files with 6 additions and 6 deletions
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
<dom-module id="rhodecode-app">
|
||||
<template>
|
||||
<rhodecode-favicon></rhodecode-favicon>
|
||||
<rhodecode-toast id="notifications"></rhodecode-toast>
|
||||
<channelstream-connection
|
||||
id="channelstream-connection"
|
||||
on-channelstream-listen-message="receivedMessage"
|
||||
on-channelstream-connected="handleConnected"
|
||||
on-channelstream-subscribed="handleSubscribed">
|
||||
</channelstream-connection>
|
||||
<rhodecode-favicon></rhodecode-favicon>
|
||||
<rhodecode-toast id="notifications"></rhodecode-toast>
|
||||
</template>
|
||||
<script src="rhodecode-app.js"></script>
|
||||
</dom-module>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ var rhodeCodeApp = Polymer({
|
|||
|
||||
/** subscribes users from channels in channelstream */
|
||||
subscribeToChannelTopic: function (channels) {
|
||||
var channelstreamConnection = this.$['channelstream-connection'];
|
||||
var channelstreamConnection = this.getChannelStreamConnection();
|
||||
var toSubscribe = channelstreamConnection.calculateSubscribe(channels);
|
||||
ccLog.debug('subscribeToChannelTopic', toSubscribe);
|
||||
if (toSubscribe.length > 0) {
|
||||
|
|
@ -104,7 +104,7 @@ var rhodeCodeApp = Polymer({
|
|||
},
|
||||
|
||||
handleConnected: function (event) {
|
||||
var channelstreamConnection = this.$['channelstream-connection'];
|
||||
var channelstreamConnection = this.getChannelStreamConnection();
|
||||
channelstreamConnection.set('channelsState',
|
||||
event.detail.channels_info);
|
||||
channelstreamConnection.set('userState', event.detail.state);
|
||||
|
|
@ -112,7 +112,7 @@ var rhodeCodeApp = Polymer({
|
|||
this.propagageChannelsState();
|
||||
},
|
||||
handleSubscribed: function (event) {
|
||||
var channelstreamConnection = this.$['channelstream-connection'];
|
||||
var channelstreamConnection = this.getChannelStreamConnection();
|
||||
var channelInfo = event.detail.channels_info;
|
||||
var channelKeys = Object.keys(event.detail.channels_info);
|
||||
for (var i = 0; i < channelKeys.length; i++) {
|
||||
|
|
@ -124,7 +124,7 @@ var rhodeCodeApp = Polymer({
|
|||
},
|
||||
/** propagates channel states on topics */
|
||||
propagageChannelsState: function (event) {
|
||||
var channelstreamConnection = this.$['channelstream-connection'];
|
||||
var channelstreamConnection = this.getChannelStreamConnection();
|
||||
var channel_data = channelstreamConnection.channelsState;
|
||||
var channels = channelstreamConnection.channels;
|
||||
for (var i = 0; i < channels.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue