diff --git a/components/toast_wrapper/toast_wrapper.jsx b/components/toast_wrapper/toast_wrapper.jsx index 72dfbb90f8ce..98711a2fca94 100644 --- a/components/toast_wrapper/toast_wrapper.jsx +++ b/components/toast_wrapper/toast_wrapper.jsx @@ -13,6 +13,7 @@ import {browserHistory} from 'utils/browser_history'; import LocalDateTime from 'components/local_date_time'; const TOAST_TEXT_COLLAPSE_WIDTH = 500; +const THRESHOLD_FROM_BOTTOM = 1000; class ToastWrapper extends React.PureComponent { static propTypes = { @@ -85,7 +86,7 @@ class ToastWrapper extends React.PureComponent { // show unread toast on mount when channel is not at bottom and unread count greater than 0 if (typeof showUnreadToast === 'undefined' && props.atBottom !== null) { - showUnreadToast = unreadCount > 0 && props.initScrollOffsetFromBottom > 1000; + showUnreadToast = unreadCount > 0 && props.initScrollOffsetFromBottom > THRESHOLD_FROM_BOTTOM; } if (typeof showMessageHistoryToast === 'undefined' && props.focusedPostId !== '' && props.atBottom !== null) {