From f38de8c6b0a7b07a89fbecb55bea727b4552894b Mon Sep 17 00:00:00 2001
From: default
Date: Fri, 14 Apr 2023 09:57:18 +0200
Subject: Show a top link to the (future) notifications area, including a count
of new ones.
---
html.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
(limited to 'html.c')
diff --git a/html.c b/html.c
index c8d3e39..e448cd8 100644
--- a/html.c
+++ b/html.c
@@ -282,14 +282,27 @@ d_char *html_user_header(snac *snac, d_char *s, int local)
"%s\n",
snac->actor, L("RSS"),
snac->actor, L("private"));
- else
+ else {
+ xs *n_list = notify_list(snac, 1);
+ int n_len = xs_list_len(n_list);
+ xs *n_str = NULL;
+
+ /* show the notification number, if there are any */
+ if (n_len)
+ n_str = xs_fmt(" %d ", n_len);
+ else
+ n_str = xs_str_new("");
+
s1 = xs_fmt(
"%s - "
"%s - "
+ "%s%s - "
"%s\n",
snac->actor, L("public"),
snac->actor, L("private"),
+ snac->actor, L("notifications"), n_str,
snac->actor, L("people"));
+ }
s = xs_str_cat(s, s1);
}
--
cgit v1.2.3