From c372d05025afb99c3fb133690299f8051e531637 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Mon, 25 Apr 2022 17:18:05 +0000 Subject: [PATCH] Fix status without boosts FossilOrigin-Name: 37476d56c13f63af307ed75f126a8dd36f3abca18872566d0356692a7e3d1a8f --- dist/treebird20.css | 4 +++- src/status.c | 4 ++-- src/string_helpers.c | 5 +++-- static/account.html | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dist/treebird20.css b/dist/treebird20.css index 30a331f..e9d3daa 100644 --- a/dist/treebird20.css +++ b/dist/treebird20.css @@ -544,7 +544,7 @@ svg.in-reply-to-icon .pfp-td img { - border-radius: 3px; + border-radius: 5px; width: 56px; height: 56px; object-fit: cover; @@ -709,6 +709,7 @@ svg.in-reply-to-icon .status-interactions { border-bottom: 1px solid #ddbfbf; + margin-top: 2px; } .status-interactions-labels @@ -721,6 +722,7 @@ svg.in-reply-to-icon .status-interactions-labels .header-btn { padding: 8px 12px; + font-size: 15px; } .status-interactions-labels .header-btn .btn-content diff --git a/src/status.c b/src/status.c index 58515b6..69c8895 100644 --- a/src/status.c +++ b/src/status.c @@ -362,8 +362,8 @@ char* construct_status(mastodont_t* api, struct mstdnt_account* reblogs = NULL; struct mstdnt_storage favourites_storage = { 0 }; struct mstdnt_storage reblogs_storage = { 0 }; - size_t favourites_len; - size_t reblogs_len; + size_t favourites_len = 0; + size_t reblogs_len = 0; // If focused, show status interactions if ((flags & STATUS_FOCUSED) == STATUS_FOCUSED && diff --git a/src/string_helpers.c b/src/string_helpers.c index c816e89..0640d93 100644 --- a/src/string_helpers.c +++ b/src/string_helpers.c @@ -61,8 +61,9 @@ char* construct_func_strings(char* (*func)(void*, size_t, int*), // Cleanup free(res_html); } - - result[curr_parse_size] = '\0'; + + if (result) + result[curr_parse_size] = '\0'; if (ret_size) *ret_size = curr_parse_size; diff --git a/static/account.html b/static/account.html index ca33af3..33426ce 100644 --- a/static/account.html +++ b/static/account.html @@ -35,7 +35,7 @@ %d - + %s