From d331e5b9645c15051ce8d174133adf34dfde2ca2 Mon Sep 17 00:00:00 2001 From: enahum Date: Mon, 30 May 2016 09:12:44 -0300 Subject: PLT-2973 Fix Channel view doesn't scroll to New Messages indicator on first load (#3151) --- webapp/components/post_view/post_view_controller.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/components/post_view/post_view_controller.jsx b/webapp/components/post_view/post_view_controller.jsx index 0898a9ce6..d2866d8eb 100644 --- a/webapp/components/post_view/post_view_controller.jsx +++ b/webapp/components/post_view/post_view_controller.jsx @@ -48,7 +48,7 @@ export default class PostViewController extends React.Component { profiles, atTop: PostStore.getVisibilityAtTop(channel.id), lastViewed, - scrollType: ScrollTypes.BOTTOM, + scrollType: ScrollTypes.NEW_MESSAGE, displayNameType: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, 'name_format', 'false'), displayPostsInCenter: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.CHANNEL_DISPLAY_MODE, Preferences.CHANNEL_DISPLAY_MODE_DEFAULT) === Preferences.CHANNEL_DISPLAY_MODE_CENTERED, compactDisplay: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.MESSAGE_DISPLAY, Preferences.MESSAGE_DISPLAY_DEFAULT) === Preferences.MESSAGE_DISPLAY_COMPACT @@ -132,7 +132,7 @@ export default class PostViewController extends React.Component { displayNameType: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, 'name_format', 'false'), displayPostsInCenter: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.CHANNEL_DISPLAY_MODE, Preferences.CHANNEL_DISPLAY_MODE_DEFAULT) === Preferences.CHANNEL_DISPLAY_MODE_CENTERED, compactDisplay: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.MESSAGE_DISPLAY, Preferences.MESSAGE_DISPLAY_DEFAULT) === Preferences.MESSAGE_DISPLAY_COMPACT, - scrollType: ScrollTypes.BOTTOM + scrollType: ScrollTypes.NEW_MESSAGE }); } } @@ -241,6 +241,7 @@ export default class PostViewController extends React.Component { displayNameType={this.state.displayNameType} displayPostsInCenter={this.state.displayPostsInCenter} compactDisplay={this.state.compactDisplay} + lastViewed={this.state.lastViewed} /> ); } -- cgit v1.2.3-1-g7c22