You want promises? I bring you commitments.
This commit is contained in:
parent
fcccccb6bc
commit
ab95a803b4
9 changed files with 379 additions and 276 deletions
src/ami.js
|
@ -122,9 +122,9 @@ var AmiContext = function(title, auth, loading) {
|
|||
pub.textTriggers = textTriggers;
|
||||
settings.watch('runJokeTriggers', function(value) {
|
||||
if(!textTriggers.hasTriggers())
|
||||
futami.getJson('texttriggers', function(trigInfos) {
|
||||
textTriggers.addTriggers(trigInfos);
|
||||
});
|
||||
futami.getJson('texttriggers')
|
||||
.success(textTriggers.addTriggers)
|
||||
.run();
|
||||
});
|
||||
|
||||
var styles = new AmiStyles;
|
||||
|
@ -187,11 +187,11 @@ var AmiContext = function(title, auth, loading) {
|
|||
return;
|
||||
}
|
||||
|
||||
futami.getApiJson('/v1/emotes', function(emotes) {
|
||||
futami.getApiJson('/v1/emotes').success(emotes => {
|
||||
if(Array.isArray(emotes))
|
||||
emoticons.load(emotes);
|
||||
chat.emoticonList.render(emoticons);
|
||||
});
|
||||
}).run();
|
||||
});
|
||||
|
||||
var reconnecter = new AmiReconnecter(chat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue