Mark conversation read on window focus event

Fixes #282

// FREEBIE
This commit is contained in:
lilia 2015-06-26 11:53:00 -07:00
parent 29360fea5c
commit 5e6145aa46

View file

@ -57,8 +57,12 @@
var onResize = this.forceUpdateMessageFieldSize.bind(this);
this.appWindow.contentWindow.addEventListener('resize', onResize);
var onfocus = this.markRead.bind(this);
this.appWindow.contentWindow.addEventListener('focus', onfocus);
this.appWindow.onClosed.addListener(function () {
this.appWindow.contentWindow.removeEventListener('resize', onResize);
this.appWindow.contentWindow.removeEventListener('focus', onfocus);
window.autosize.destroy(this.$messageField);
this.remove();
}.bind(this));