Fix race causing channels to not clear mention on focus (#6587)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
876c5dc9df
Коммит
382ba0b0d1
@@ -119,12 +119,12 @@ export default class NeedsTeam extends React.Component {
|
|||||||
|
|
||||||
// Set up tracking for whether the window is active
|
// Set up tracking for whether the window is active
|
||||||
window.isActive = true;
|
window.isActive = true;
|
||||||
$(window).on('focus', () => {
|
$(window).on('focus', async () => {
|
||||||
this.props.actions.viewChannel(ChannelStore.getCurrentId());
|
|
||||||
ChannelStore.resetCounts([ChannelStore.getCurrentId()]);
|
ChannelStore.resetCounts([ChannelStore.getCurrentId()]);
|
||||||
ChannelStore.emitChange();
|
ChannelStore.emitChange();
|
||||||
|
|
||||||
window.isActive = true;
|
window.isActive = true;
|
||||||
|
|
||||||
|
await this.props.actions.viewChannel(ChannelStore.getCurrentId());
|
||||||
if (new Date().getTime() - this.blurTime > UNREAD_CHECK_TIME_MILLISECONDS) {
|
if (new Date().getTime() - this.blurTime > UNREAD_CHECK_TIME_MILLISECONDS) {
|
||||||
this.props.actions.getMyChannelMembers(TeamStore.getCurrentId()).then(loadProfilesForSidebar);
|
this.props.actions.getMyChannelMembers(TeamStore.getCurrentId()).then(loadProfilesForSidebar);
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user