Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Regular status mutating custom status #20613

Merged
merged 2 commits into from
Feb 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/sidebar/header/UserDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ const UserDropdown = ({ user, onClose }) => {
<Divider mi='neg-x16' mb='x16' borderColor='muted'/>
<div style={style}>
<Box pi='x16' fontScale='c1' textTransform='uppercase'>{t('Status')}</Box>
{Object.keys(userStatus.list).map((key, index) => {
{Object.keys(userStatus.list).map((key) => {
const status = userStatus.list[key];
const name = status.localizeName ? t(status.name) : status.name;
const modifier = status.statusType || user.status;

return <Option onClick={() => { setStatus(status.statusType, name); onClose(); }} key={index}>
return <Option onClick={() => { setStatus(status.statusType, ''); onClose(); }}>
<Option.Column><UserStatus status={modifier}/></Option.Column>
<Option.Content withTruncatedText fontScale='p2'>{name}</Option.Content>
</Option>;
Expand Down