Permalink
Browse files

Changes components to interact with alt

Changing some API terminology so this plays well with alt. Alt uses
`listen` and `unlisten` for the store's listener.
  • Loading branch information...
goatslacker committed Dec 27, 2014
1 parent 0129baa commit e05a4e02f3f13831361136a21cd757416b69b4d8
@@ -42,13 +42,13 @@ var MessageSection = React.createClass({
componentDidMount: function() {
this._scrollToBottom();
MessageStore.addChangeListener(this._onChange);
ThreadStore.addChangeListener(this._onChange);
MessageStore.listen(this._onChange);
ThreadStore.listen(this._onChange);
},
componentWillUnmount: function() {
MessageStore.removeChangeListener(this._onChange);
ThreadStore.removeChangeListener(this._onChange);
MessageStore.unlisten(this._onChange);
ThreadStore.unlisten(this._onChange);
},
render: function() {
@@ -33,13 +33,13 @@ var ThreadSection = React.createClass({
},
componentDidMount: function() {
ThreadStore.addChangeListener(this._onChange);
UnreadThreadStore.addChangeListener(this._onChange);
ThreadStore.listen(this._onChange);
UnreadThreadStore.listen(this._onChange);
},
componentWillUnmount: function() {
ThreadStore.removeChangeListener(this._onChange);
UnreadThreadStore.removeChangeListener(this._onChange);
ThreadStore.unlisten(this._onChange);
UnreadThreadStore.unlisten(this._onChange);
},
render: function() {

0 comments on commit e05a4e0

Please sign in to comment.