Skip to content

Commit

Permalink
fix: process standard emojis in UserButton
Browse files Browse the repository at this point in the history
  • Loading branch information
RuzikNF committed Sep 23, 2020
1 parent 096f50c commit ddae199
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/UserButton/UserButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,11 @@ export class UserButton extends DChannelButton {
async loadStatusEmoji(presence: Presence) {
this.statusIcon.hide();
const activity = presence.activities.find((a) => !!a.emoji);
if (!activity || !activity.emoji || !activity.emoji.id) return;
// @ts-ignore
if (!activity || !activity.emoji || !activity.emoji.name) return;
const emojiPath = await resolveEmoji({
emoji_id: activity.emoji.id,
emoji_id: activity.emoji.id || undefined,
emoji_name: activity.emoji.name,
});
if (!emojiPath) return;
const pix = new QPixmap(emojiPath);
this.statusIcon.setPixmap(pix.scaled(14, 14, 1, 1));
this.statusIcon.show();
Expand Down

0 comments on commit ddae199

Please sign in to comment.