telepathyClient: Code cleanup
Move a function to where it's used and rename "_createSource" to reflect that it creates *chat* sources. https://bugzilla.gnome.org/show_bug.cgi?id=654791
This commit is contained in:
parent
bf2ba83cd5
commit
80b98d8787
@ -139,14 +139,14 @@ Client.prototype = {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* We got the TpContact */
|
/* We got the TpContact */
|
||||||
this._createSource(account, conn, channel, contacts[0]);
|
this._createChatSource(account, conn, channel, contacts[0]);
|
||||||
}), null);
|
}), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
context.accept();
|
context.accept();
|
||||||
},
|
},
|
||||||
|
|
||||||
_createSource: function(account, conn, channel, contact) {
|
_createChatSource: function(account, conn, channel, contact) {
|
||||||
if (this._chatSources[channel.get_object_path()])
|
if (this._chatSources[channel.get_object_path()])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -167,6 +167,12 @@ Client.prototype = {
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_handleChannels: function(handler, account, conn, channels,
|
||||||
|
requests, user_action_time, context) {
|
||||||
|
this._handlingChannels(account, conn, channels);
|
||||||
|
context.accept();
|
||||||
|
},
|
||||||
|
|
||||||
_handlingChannels: function(account, conn, channels) {
|
_handlingChannels: function(account, conn, channels) {
|
||||||
let len = channels.length;
|
let len = channels.length;
|
||||||
for (let i = 0; i < len; i++) {
|
for (let i = 0; i < len; i++) {
|
||||||
@ -290,12 +296,6 @@ Client.prototype = {
|
|||||||
context.accept();
|
context.accept();
|
||||||
},
|
},
|
||||||
|
|
||||||
_handleChannels: function(handler, account, conn, channels,
|
|
||||||
requests, user_action_time, context) {
|
|
||||||
this._handlingChannels(account, conn, channels);
|
|
||||||
context.accept();
|
|
||||||
},
|
|
||||||
|
|
||||||
_delegatedChannelsCb: function(client, channels) {
|
_delegatedChannelsCb: function(client, channels) {
|
||||||
// Nothing to do as we don't make a distinction between observed and
|
// Nothing to do as we don't make a distinction between observed and
|
||||||
// handled channels.
|
// handled channels.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user