Fix broken avatars

This commit is contained in:
saltrafael 2021-07-29 09:39:29 -03:00
parent ec6a2c315b
commit 4e02c84f90
No known key found for this signature in database
GPG key ID: 9C7F1DC0B0F54515

View file

@ -94,26 +94,34 @@ export default function Notification(props: Props) {
}; };
let icon; let icon;
const creatorIcon =
<UriIndicator uri={notification_parameters.dynamic.comment_author} link>
<ChannelThumbnail small uri={notification_parameters.dynamic.comment_author} />
</UriIndicator>;
switch (notification_rule) { switch (notification_rule) {
case RULE.CREATOR_SUBSCRIBER: case RULE.CREATOR_SUBSCRIBER:
icon = <Icon icon={ICONS.SUBSCRIBE} sectionIcon />; icon = <Icon icon={ICONS.SUBSCRIBE} sectionIcon />;
break; break;
case RULE.COMMENT: case RULE.COMMENT:
case RULE.CREATOR_COMMENT: case RULE.CREATOR_COMMENT:
icon = creatorIcon; icon =
<UriIndicator uri={notification_parameters.dynamic.comment_author} link>
<ChannelThumbnail small uri={notification_parameters.dynamic.comment_author} />
</UriIndicator>;
break; break;
case RULE.COMMENT_REPLY: case RULE.COMMENT_REPLY:
icon = creatorIcon; icon =
<UriIndicator uri={notification_parameters.dynamic.reply_author} link>
<ChannelThumbnail small uri={notification_parameters.dynamic.reply_author} />
</UriIndicator>;
break; break;
case RULE.NEW_CONTENT: case RULE.NEW_CONTENT:
icon = creatorIcon; icon =
<UriIndicator uri={notification_parameters.dynamic.channel_url} link>
<ChannelThumbnail small uri={notification_parameters.dynamic.channel_url} />
</UriIndicator>;
break; break;
case RULE.NEW_LIVESTREAM: case RULE.NEW_LIVESTREAM:
icon = creatorIcon; icon =
<UriIndicator uri={notification_parameters.dynamic.channel_url} link>
<ChannelThumbnail small uri={notification_parameters.dynamic.channel_url} />
</UriIndicator>;
break; break;
case RULE.DAILY_WATCH_AVAILABLE: case RULE.DAILY_WATCH_AVAILABLE:
case RULE.DAILY_WATCH_REMIND: case RULE.DAILY_WATCH_REMIND: