1Dot Will it execute every second??
Yes
It should be something like this:
extend(DiscussionPage.prototype, 'oncreate', function() {
setInterval(()=> {
app.store.find('discussions', this.discussion.id()).then(() => {
this.stream.update();
})
}, 1000);
})
Or:
setInterval(()=> {
app.store.find('discussions', app.current.get('discussion').id()).then(() => {
app.current.get('stream').update()
})
}, 1000);