Interactions labels and html

FossilOrigin-Name: 38569e94a278bd43354674de33ccb85d728a87e5178979529c8cf7b2d3d0563b
This commit is contained in:
me@ow.nekobit.net 2022-04-21 21:09:04 +00:00
parent 9f434eb3a4
commit 7f7a95897a
3 changed files with 23 additions and 1 deletions

View file

@ -136,6 +136,27 @@ int try_interact_status(struct session* ssn, mastodont_t* api, char* id)
return 0;
}
char* construct_status_interactions_label(char* header, int size, size_t* size)
{
char* html;
size_t s;
s = easprintf(&html, data_status_interactions_label_html,
header, size);
if (size) *size = s;
return html;
}
char* construct_status_interactions(struct mstdnt_status* status, struct mstdnt_account* accounts, size_t accounts_len)
{
char* html;
char* repeats_label = status->fa;
char* favourites_label;
size_t s;
s = easprintf(&html, data_status_interactions_html);
if (size) *size = s;
return html;
}
char* construct_in_reply_to(mastodont_t* api, struct mstdnt_status* status, size_t* size)
{
char* irt_html;

View file

@ -39,6 +39,7 @@ char* construct_status(mastodont_t* api, struct mstdnt_status* status, int* size
char* construct_statuses(mastodont_t* api, struct mstdnt_status* statuses, size_t size, size_t* ret_size);
char* construct_in_reply_to(mastodont_t* api, struct mstdnt_status* status, size_t* size);
char* construct_status_interactions(struct mstdnt_account* accounts, size_t accounts_len);
char* construct_status_interactions_label(char* header, int size, size_t* size);
char* reformat_status(char* content, struct mstdnt_emoji* emos, size_t emos_len);
char* greentextify(char* content);

View file

@ -1,4 +1,4 @@
<div class="header-btn btn">
<span class="btn-header">%s</span>
<span class="btn-content">%s</span>
<span class="btn-content">%d</span>
</div>