Merge pull request #7950 from jfsiebel/fix-clear-all-status

Fix Clear All status icons
This commit is contained in:
Anton Georgiev 2019-08-19 12:15:29 -04:00 committed by GitHub
commit ff65a7dac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View File

@ -27,9 +27,7 @@ export default function handleEmojiStatus({ body }, meetingId) {
}
if (numChanged) {
Logger.info(`Assigned user emoji status${
emoji} id=${userId} meeting=${meetingId}`,
);
Logger.info(`Assigned user emoji status ${emoji} id=${userId} meeting=${meetingId}`);
}
};

View File

@ -368,12 +368,12 @@ const normalizeEmojiName = emoji => (
emoji in EMOJI_STATUSES ? EMOJI_STATUSES[emoji] : emoji
);
const setEmojiStatus = (data) => {
const statusAvailable = (Object.keys(EMOJI_STATUSES).includes(data));
const setEmojiStatus = (userId, emoji) => {
const statusAvailable = (Object.keys(EMOJI_STATUSES).includes(emoji));
return statusAvailable
? makeCall('setEmojiStatus', Auth.userID, data)
: makeCall('setEmojiStatus', data, 'none');
? makeCall('setEmojiStatus', Auth.userID, emoji)
: makeCall('setEmojiStatus', userId, 'none');
};
const assignPresenter = (userId) => { makeCall('assignPresenter', userId); };

View File

@ -272,7 +272,7 @@ class UserDropdown extends PureComponent {
statuses.map(status => actions.push(this.makeDropdownItem(
status,
intl.formatMessage({ id: `app.actionsBar.emojiMenu.${status}Label` }),
() => { handleEmojiChange(status); this.resetMenuState(); },
() => { handleEmojiChange(user.id, status); this.resetMenuState(); },
getEmojiList[status],
)));

View File

@ -37,7 +37,7 @@ const UserOptionsContainer = withTracker((props) => {
} = props;
const toggleStatus = () => {
users.forEach(id => setEmojiStatus(id, 'none'));
users.forEach(user => setEmojiStatus(user.userId, 'none'));
notify(
intl.formatMessage(intlMessages.clearStatusMessage), 'info', 'clear_status',
);