Commit fafc15f0 authored by Bryce Johnson's avatar Bryce Johnson

Break up mount hook actions.

parent ff8adc9d
......@@ -46,18 +46,20 @@ function getRandomInt(min, max) {
this.issuable = data;
},
},
created() {
this.fetchIssuable();
subscribeToUpdates() {
gl.IssuableResource.subscribe(data => this.updateState(data));
},
listenForSlashCommands() {
$(document).on('ajax:success', '.gfm-form', (e) => {
// TODO: check if slash command was updated.
this.fetchIssuable();
});
}
},
mounted() {
gl.IssuableResource.subscribe(data => this.updateState(data));
this.initPolling();
$(document).on('ajax:success', '.gfm-form', (e) => {
// TODO: check if slash command was updated.
this.fetchIssuable();
});
this.subscribeToUpdates();
this.listenForSlashCommands();
}
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment