diff --git a/app/scenes/channel_drawer/channel_drawer.js b/app/scenes/channel_drawer/channel_drawer.js
index 0a108b879..641125b4c 100644
--- a/app/scenes/channel_drawer/channel_drawer.js
+++ b/app/scenes/channel_drawer/channel_drawer.js
@@ -32,7 +32,7 @@ export default class ChannelDrawer extends PureComponent {
currentTeam
} = this.props;
- this.props.actions.markChannelAsRead(id, currentChannel.id);
+ this.props.actions.markChannelAsRead(currentChannel.id);
this.props.actions.viewChannel(currentTeam.id, id);
this.props.actions.closeDrawers();
InteractionManager.runAfterInteractions(() => {
diff --git a/app/scenes/thread/thread.js b/app/scenes/thread/thread.js
index 9ede59a92..14a5ab038 100644
--- a/app/scenes/thread/thread.js
+++ b/app/scenes/thread/thread.js
@@ -27,6 +27,7 @@ export default class Thread extends PureComponent {
}).isRequired,
teamId: PropTypes.string.isRequired,
channelId: PropTypes.string.isRequired,
+ myMember: PropTypes.object.isRequired,
files: PropTypes.array,
rootId: PropTypes.string.isRequired,
draft: PropTypes.string.isRequired,
@@ -40,6 +41,14 @@ export default class Thread extends PureComponent {
}
};
+ state = {};
+
+ componentWillReceiveProps(nextProps) {
+ if (!this.state.lastViewedAt) {
+ this.setState({lastViewedAt: nextProps.myMember.last_viewed_at});
+ }
+ }
+
componentWillUnmount() {
this.props.actions.selectPost('');
}
@@ -58,7 +67,12 @@ export default class Thread extends PureComponent {
keyboardVerticalOffset={65}
>
-
+