forked from mirrors/treebird
Unlike, unrepeat
FossilOrigin-Name: ffdf0651a0d3bd72669b663e8850b987d1b0a0d47bd703d98dea11fe5098e160
This commit is contained in:
parent
ce3ee07ef0
commit
dd0bf855d1
2 changed files with 9 additions and 6 deletions
11
src/status.c
11
src/status.c
|
@ -87,12 +87,13 @@ int try_interact_status(mastodont_t* api, char* id)
|
|||
|
||||
// Pretty up the type
|
||||
if (strcmp(post.itype, "like") == 0)
|
||||
{
|
||||
mastodont_favourite_status(api, id, &storage, NULL);
|
||||
}
|
||||
else if (strcmp(post.itype, "repeat") == 0) {
|
||||
else if (strcmp(post.itype, "repeat") == 0)
|
||||
mastodont_reblog_status(api, id, &storage, NULL);
|
||||
}
|
||||
else if (strcmp(post.itype, "unlike") == 0)
|
||||
mastodont_unfavourite_status(api, id, &storage, NULL);
|
||||
else if (strcmp(post.itype, "repeat") == 0)
|
||||
mastodont_unreblog_status(api, id, &storage, NULL);
|
||||
|
||||
mastodont_storage_cleanup(&storage);
|
||||
|
||||
|
@ -145,10 +146,12 @@ char* construct_status(struct mstdnt_status* status,
|
|||
reply_count ? reply_count : "",
|
||||
config_url_prefix,
|
||||
status->id,
|
||||
status->reblogged ? "un" : "",
|
||||
status->reblogged ? "active" : "",
|
||||
repeat_count ? repeat_count : "",
|
||||
config_url_prefix,
|
||||
status->id,
|
||||
status->favourited ? "un" : "",
|
||||
status->favourited ? "active" : "",
|
||||
favourites_count ? favourites_count : "",
|
||||
config_url_prefix,
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="repeat">
|
||||
<input type="hidden" name="itype" value="%srepeat">
|
||||
<label class="pointer">
|
||||
<svg class="repeat %s" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 2.1l4 4-4 4"/><path d="M3 12.2v-2a4 4 0 0 1 4-4h12.8M7 21.9l-4-4 4-4"/><path d="M21 11.8v2a4 4 0 0 1-4 4H4.2"/></svg>
|
||||
<span class="count">%s</span>
|
||||
|
@ -44,7 +44,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="like">
|
||||
<input type="hidden" name="itype" value="%slike">
|
||||
<label class="pointer">
|
||||
<svg class="like %s" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
|
||||
<span class="count">%s</span>
|
||||
|
|
Loading…
Reference in a new issue