fix: Avatar renders an incorrect symbol if it has emoji (#5184)

This commit is contained in:
Sivin Varghese
2022-08-03 14:11:33 +05:30
committed by GitHub
parent e0cebfaa1a
commit f7d4f39b5c
3 changed files with 22 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
/>
<Avatar
v-else
:username="username"
:username="userNameWithoutEmoji"
:class="thumbnailClass"
:size="avatarSize"
:variant="variant"
@@ -86,6 +86,7 @@
* Username - User name for avatar
*/
import Avatar from './Avatar';
import { removeEmoji } from 'shared/helpers/emoji';
export default {
components: {
@@ -131,6 +132,9 @@ export default {
};
},
computed: {
userNameWithoutEmoji() {
return removeEmoji(this.username);
},
showStatusIndicator() {
if (this.shouldShowStatusAlways) return true;
return this.status === 'online' || this.status === 'busy';