Move queuedForTyping assignment (#5366)

This commit is contained in:
Angus McLeod 2017-11-27 06:43:41 +08:00 committed by Sam
parent 329343be06
commit 4b919cd735

View File

@ -165,7 +165,6 @@ export default Ember.Component.extend({
if (topicId) { args.topic_id = topicId; }
if (postId) { args.post_id = postId; }
const queuedForTyping = this.get('queuedForTyping');
composer.store.find('composer-message', args).then(messages => {
if (this.isDestroying || this.isDestroyed) { return; }
@ -176,6 +175,7 @@ export default Ember.Component.extend({
}
this.set('checkedMessages', true);
const queuedForTyping = this.get('queuedForTyping');
messages.forEach(msg => msg.wait_for_typing ? queuedForTyping.addObject(msg) : this.send('popup', msg));
});
}