From 577b79d1d2a8d4de949ffc5f312cfb90bd97ed26 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Thu, 28 Jan 2016 21:18:38 +0100 Subject: slight redo of middle panel --- src/web/js/components/MiddlePanel.react.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/web/js') diff --git a/src/web/js/components/MiddlePanel.react.js b/src/web/js/components/MiddlePanel.react.js index d2c4df5b..4fe14c09 100644 --- a/src/web/js/components/MiddlePanel.react.js +++ b/src/web/js/components/MiddlePanel.react.js @@ -35,20 +35,22 @@ var TableLine = React.createClass({ var liked = (); return (
-

{title}

- {read} {liked} {this.props.title} +
{title}
+
{read} {liked} {this.props.title}
); }, toogleRead: function() { - this.setState({read: !this.state.read}); - MiddlePanelActions.changeRead(this.props.category_id, - this.props.feed_id, this.props.article_id, !this.state.read); + this.setState({read: !this.state.read}, function() { + MiddlePanelActions.changeRead(this.props.category_id, + this.props.feed_id, this.props.article_id, this.state.read); + }.bind(this)); }, toogleLike: function() { - this.setState({liked: !this.state.liked}); - MiddlePanelActions.changeLike(this.props.category_id, - this.props.feed_id, this.props.article_id, !this.state.liked); + this.setState({liked: !this.state.liked}, function() { + MiddlePanelActions.changeLike(this.props.category_id, + this.props.feed_id, this.props.article_id, this.state.liked); + }.bind(this)); }, }); -- cgit