Fix header buttons rerender

This commit is contained in:
Diego Mello 2024-03-07 14:47:48 -03:00
parent eeb6647133
commit 8ae8fa7525
1 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,8 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
shouldComponentUpdate(nextProps: IRightButtonsProps, nextState: IRigthButtonsState) {
const { isFollowingThread, tunread, tunreadUser, tunreadGroup } = this.state;
const { teamId, status, joined, omnichannelPermissions, theme, issuesWithNotifications, notificationsDisabled } = this.props;
const { teamId, status, joined, omnichannelPermissions, theme, disabled, issuesWithNotifications, notificationsDisabled } =
this.props;
if (nextProps.teamId !== teamId) {
return true;
}
@ -110,6 +111,9 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
if (nextProps.theme !== theme) {
return true;
}
if (nextProps.disabled !== disabled) {
return true;
}
if (nextState.isFollowingThread !== isFollowingThread) {
return true;
}