about summary refs log tree commit diff stats
path: root/src/ui/console.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-05-31 10:03:22 +0200
committerGitHub <noreply@github.com>2021-05-31 10:03:22 +0200
commit956fd547c1beaeb1254b2899f1f3576f5511128a (patch)
tree1e4baf645cd61d75682ccbf722223592ac5fbaca /src/ui/console.c
parent9f174c53cf7d52a7b684ed1e0d6ed00463eb498b (diff)
parent6df062b542d2376d464b2a9d8d6577fdf906cab4 (diff)
downloadprofani-tty-956fd547c1beaeb1254b2899f1f3576f5511128a.tar.gz
Merge pull request #1543 from DebXWoody/feature/attention-flag
Feature - attention flag
Diffstat (limited to 'src/ui/console.c')
-rw-r--r--src/ui/console.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 3eff47d5..74a7740f 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -507,6 +507,26 @@ cons_show_wins(gboolean unread)
 }
 
 void
+cons_show_wins_attention() {
+    ProfWin* console = wins_get_console();
+    cons_show("");
+    GSList* window_strings = wins_create_summary_attention();
+
+    GSList* curr = window_strings;
+    while (curr) {
+        if (g_strstr_len(curr->data, strlen(curr->data), " unread") > 0) {
+            win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", curr->data);
+        } else {
+            win_println(console, THEME_DEFAULT, "-", "%s", curr->data);
+        }
+        curr = g_slist_next(curr);
+    }
+    g_slist_free_full(window_strings, free);
+
+    cons_alert(NULL);
+}
+
+void
 cons_show_room_invites(GList* invites)
 {
     cons_show("");