FEATURE: add a delay on the "mention" warning in composer
Previously we would warn too early about lack of visibility
This commit is contained in:
parent
d942bf6282
commit
5a6c5f2083
|
@ -425,9 +425,17 @@ export default Ember.Component.extend({
|
|||
let name = $e.data('name');
|
||||
|
||||
if (found.indexOf(name) === -1) {
|
||||
|
||||
// add a delay to allow for typing, so you don't open the warning right away
|
||||
// previously we would warn after @bob even if you were about to mention @bob2
|
||||
Em.run.later(this, () => {
|
||||
if ($preview.find('.mention.cannot-see[data-name="' + name + '"]').length > 0) {
|
||||
this.sendAction('cannotSeeMention', [{ name: name }]);
|
||||
found.push(name);
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
this.set('warnedCannotSeeMentions', found);
|
||||
|
|
Loading…
Reference in New Issue