Reverted New Messages indicator in center channel (#2853)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
8125f3ca36
Коммит
95de1468ac
@@ -50,7 +50,6 @@ export default class PostsView extends React.Component {
|
|||||||
centerPosts: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.CHANNEL_DISPLAY_MODE, Preferences.CHANNEL_DISPLAY_MODE_DEFAULT) === Preferences.CHANNEL_DISPLAY_MODE_CENTERED,
|
centerPosts: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.CHANNEL_DISPLAY_MODE, Preferences.CHANNEL_DISPLAY_MODE_DEFAULT) === Preferences.CHANNEL_DISPLAY_MODE_CENTERED,
|
||||||
isScrolling: false,
|
isScrolling: false,
|
||||||
topPostId: null,
|
topPostId: null,
|
||||||
showUnreadMessageAlert: false,
|
|
||||||
currentUser: UserStore.getCurrentUser(),
|
currentUser: UserStore.getCurrentUser(),
|
||||||
profiles: UserStore.getProfiles()
|
profiles: UserStore.getProfiles()
|
||||||
};
|
};
|
||||||
@@ -409,13 +408,6 @@ export default class PostsView extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
if (this.props.postList && this.props.postList.order.length) {
|
|
||||||
if (this.props.postList.order[0] !== nextProps.postList.order[0] && nextProps.scrollType !== PostsView.SCROLL_TYPE_BOTTOM && nextProps.scrollType !== PostsView.SCROLL_TYPE_NEW_MESSAGE && nextProps.postList.posts[nextProps.postList.order[0]].user_id !== nextProps.currentUser.id && this.props.postList.order[1] !== nextProps.postList.order[0]) { // new message from another user and not deleted
|
|
||||||
this.setState({showUnreadMessageAlert: true});
|
|
||||||
} else if (nextProps.scrollType === PostsView.SCROLL_TYPE_BOTTOM) {
|
|
||||||
this.setState({showUnreadMessageAlert: false});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!this.props.isActive && nextProps.isActive) {
|
if (!this.props.isActive && nextProps.isActive) {
|
||||||
this.updateState();
|
this.updateState();
|
||||||
PreferenceStore.addChangeListener(this.updateState);
|
PreferenceStore.addChangeListener(this.updateState);
|
||||||
@@ -550,18 +542,6 @@ export default class PostsView extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
className='post-list__new-messages-below'
|
|
||||||
onClick={this.scrollToBottomAnimated}
|
|
||||||
hidden={!this.state.showUnreadMessageAlert}
|
|
||||||
>
|
|
||||||
<i className='fa fa-angle-down'></i>
|
|
||||||
|
|
||||||
<FormattedMessage
|
|
||||||
id='posts_view.newMsg'
|
|
||||||
defaultMessage='New Messages'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,33 +170,6 @@ body.ios {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-list__new-messages-below {
|
|
||||||
@include single-transition(bottom .5s cubic-bezier(86, 0, 07, 1));
|
|
||||||
@include opacity(.9);
|
|
||||||
background-color: $black;
|
|
||||||
border-radius: 1em;
|
|
||||||
bottom: 10px;
|
|
||||||
color: $white;
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
left: 50%;
|
|
||||||
padding: .3em .75em;
|
|
||||||
position: absolute;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
|
|
||||||
&[hidden] {
|
|
||||||
bottom: -30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa {
|
|
||||||
font-size: 17px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: 1px;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.file-overlay {
|
.file-overlay {
|
||||||
color: $white;
|
color: $white;
|
||||||
font-size: em(20px);
|
font-size: em(20px);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user