CSS fixes and notification emojis

FossilOrigin-Name: f9bc1382cd9622de84be83a9fb9e903c7fd82bd1390c6e9b417588ea815a4675
This commit is contained in:
nekobit 2022-06-05 21:45:50 +00:00
parent ada4630442
commit 8382573d30
2 changed files with 19 additions and 6 deletions

18
dist/treebird20.css vendored
View file

@ -509,6 +509,7 @@ input[type=button], input[type=submit]
padding-left: 2px;
padding-right: 2px;
margin-top: 0;
vertical-align: middle;
font-weight: bold;
}
@ -591,15 +592,18 @@ svg.in-reply-to-icon
.notification-info
{
margin-top: 7px;
margin-top: 5px;
margin-bottom: 5px;
}
.notification-info img,
.notification-info-format img
{
margin-left: 38px;
margin-left: 41px;
width: 24px;
height: 24px;
border-radius: 3px;
vertical-align: middle;
object-fit: cover;
}
@ -607,10 +611,12 @@ svg.in-reply-to-icon
.notification-info-format .notification-user
{
display: inline;
}
.notification-text-group-with-icon,
.notification-text-group
{
vertical-align: middle;
position: relative;
top: -8px;
left: 2px;
}
/***************************
@ -1225,6 +1231,7 @@ p}
{
font-size: 14px;
padding-bottom: 3px;
vertical-align: middle;
}
/* Emoji */
@ -1237,6 +1244,7 @@ p}
width: 32px;
height: 32px;
vertical-align: middle;
margin: 0;
object-fit: contain;
transition: transform .2s;
}

View file

@ -577,13 +577,18 @@ char* construct_status(struct session* ssn,
emoji_reactions = construct_emoji_reactions(status->id, status->pleroma.emoji_reactions, status->pleroma.emoji_reactions_len, NULL);
if (notif && notif->type != MSTDNT_NOTIFICATION_MENTION)
{
char* notif_display_name = emojify(notif->account->display_name,
notif->account->emojis,
notif->account->emojis_len);
struct notification_template tdata = {
.avatar = notif->account->avatar,
.username = notif->account->display_name,
.username = notif_display_name,
.action = (local_status->reblog ? notification_type_compact_str(notif->type) : notification_type_str(notif->type)),
.action_item = notification_type_svg(notif->type),
};
notif_info = tmpl_gen_notification(&tdata, NULL);
if (notif_display_name != notif->account->display_name)
free(notif_display_name);
}
if (status->in_reply_to_id && status->in_reply_to_account_id)