Extended fetchConfValue with callbacks
This commit is contained in:
parent
6149aa8a07
commit
37ba46d379
1 changed files with 4 additions and 1 deletions
|
@ -320,7 +320,7 @@ weechat.factory('connection',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var fetchConfValue = function(name) {
|
var fetchConfValue = function(name, callback) {
|
||||||
ngWebsockets.send(
|
ngWebsockets.send(
|
||||||
weeChat.Protocol.formatInfolist({
|
weeChat.Protocol.formatInfolist({
|
||||||
name: "option",
|
name: "option",
|
||||||
|
@ -329,6 +329,9 @@ weechat.factory('connection',
|
||||||
})
|
})
|
||||||
).then(function(i) {
|
).then(function(i) {
|
||||||
handlers.handleConfValue(i);
|
handlers.handleConfValue(i);
|
||||||
|
if (callback !== undefined) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue