From a2eaa5bd524316594193427cce2686477423c9a8 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sat, 9 Nov 2024 22:07:47 +0100 Subject: [PATCH] Also show notification subject --- src/bin/schedule/github_notifications.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/schedule/github_notifications.rs b/src/bin/schedule/github_notifications.rs index 64440d3..24c4f6f 100644 --- a/src/bin/schedule/github_notifications.rs +++ b/src/bin/schedule/github_notifications.rs @@ -43,7 +43,7 @@ impl> Schedule for GithubNotifications { } let mut lines = vec![]; let mut relevant = relevant.into_iter(); - for _ in 0..8 { + while lines.len() < 8 { if let Some(x) = relevant.next() { let url = x.subject.url; let Some(url) = url else { @@ -56,6 +56,11 @@ impl> Schedule for GithubNotifications { continue; } lines.push(format!("{} #{}", parts[5], parts[7])); + if lines.len() < 8 { + lines.push(format!(" {}", x.subject.title)); + } + } else { + break; } } let remaining = relevant.count();