summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/post_view_controller.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-11-24 09:08:46 -0500
committerChristopher Speller <crspeller@gmail.com>2016-11-24 09:08:46 -0500
commitc96ecae6da31aceabf29586cde872876b81d11d9 (patch)
tree94df09df540da846bb4c6ed50e8bd7879cff63ba /webapp/components/post_view/post_view_controller.jsx
parentb212acf312ad640455fa715427ac19e6930dc61d (diff)
parent36f62c9e82350f58c902f64a5d3304872431ad41 (diff)
downloadchat-c96ecae6da31aceabf29586cde872876b81d11d9.tar.gz
chat-c96ecae6da31aceabf29586cde872876b81d11d9.tar.bz2
chat-c96ecae6da31aceabf29586cde872876b81d11d9.zip
Merge branch 'release-3.5'
Diffstat (limited to 'webapp/components/post_view/post_view_controller.jsx')
-rw-r--r--webapp/components/post_view/post_view_controller.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/webapp/components/post_view/post_view_controller.jsx b/webapp/components/post_view/post_view_controller.jsx
index 57b488b54..53cd0b28c 100644
--- a/webapp/components/post_view/post_view_controller.jsx
+++ b/webapp/components/post_view/post_view_controller.jsx
@@ -202,8 +202,13 @@ export default class PostViewController extends React.Component {
}
}
- onSetNewMessageIndicator(lastViewed, ownNewMessage) {
- this.setState({lastViewed, ownNewMessage});
+ onSetNewMessageIndicator() {
+ let lastViewed = Number.MAX_VALUE;
+ const member = ChannelStore.getMyMember(this.props.channel.id);
+ if (member != null) {
+ lastViewed = member.last_viewed_at;
+ }
+ this.setState({lastViewed});
}
onPostListScroll(atBottom) {