Added handlers for the sidebar to update unread message indicators on page resize
Этот коммит содержится в:
@@ -133,12 +133,16 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
this.updateTitle();
|
this.updateTitle();
|
||||||
this.updateUnreadIndicators();
|
this.updateUnreadIndicators();
|
||||||
|
|
||||||
|
$(window).on('resize', this.onResize);
|
||||||
},
|
},
|
||||||
componentDidUpdate: function() {
|
componentDidUpdate: function() {
|
||||||
this.updateTitle();
|
this.updateTitle();
|
||||||
this.updateUnreadIndicators();
|
this.updateUnreadIndicators();
|
||||||
},
|
},
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
|
$(window).off('resize', this.onResize);
|
||||||
|
|
||||||
ChannelStore.removeChangeListener(this.onChange);
|
ChannelStore.removeChangeListener(this.onChange);
|
||||||
UserStore.removeChangeListener(this.onChange);
|
UserStore.removeChangeListener(this.onChange);
|
||||||
UserStore.removeStatusesChangeListener(this.onChange);
|
UserStore.removeStatusesChangeListener(this.onChange);
|
||||||
@@ -246,6 +250,9 @@ module.exports = React.createClass({
|
|||||||
onScroll: function(e) {
|
onScroll: function(e) {
|
||||||
this.updateUnreadIndicators();
|
this.updateUnreadIndicators();
|
||||||
},
|
},
|
||||||
|
onResize: function(e) {
|
||||||
|
this.updateUnreadIndicators();
|
||||||
|
},
|
||||||
updateUnreadIndicators: function() {
|
updateUnreadIndicators: function() {
|
||||||
var container = $(this.refs.container.getDOMNode());
|
var container = $(this.refs.container.getDOMNode());
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user