summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-05-30 09:12:44 -0300
committerChristopher Speller <crspeller@gmail.com>2016-05-30 08:12:44 -0400
commitd331e5b9645c15051ce8d174133adf34dfde2ca2 (patch)
tree045c458b37713054f828da682e789f3fe8c397fd /webapp/components/post_view
parentfe5db123744c380bdddb36f196dd6cf7518d41cf (diff)
downloadchat-d331e5b9645c15051ce8d174133adf34dfde2ca2.tar.gz
chat-d331e5b9645c15051ce8d174133adf34dfde2ca2.tar.bz2
chat-d331e5b9645c15051ce8d174133adf34dfde2ca2.zip
PLT-2973 Fix Channel view doesn't scroll to New Messages indicator on first load (#3151)
Diffstat (limited to 'webapp/components/post_view')
-rw-r--r--webapp/components/post_view/post_view_controller.jsx5
1 files 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}
/>
);
}