mirror of
https://github.com/FliegendeWurst/raspi-oled.git
synced 2024-11-24 19:24:57 +00:00
Also show notification subject
This commit is contained in:
parent
6e0dbcf006
commit
a2eaa5bd52
@ -43,7 +43,7 @@ impl<D: DrawTarget<Color = Rgb565>> Schedule<D> for GithubNotifications {
|
|||||||
}
|
}
|
||||||
let mut lines = vec![];
|
let mut lines = vec![];
|
||||||
let mut relevant = relevant.into_iter();
|
let mut relevant = relevant.into_iter();
|
||||||
for _ in 0..8 {
|
while lines.len() < 8 {
|
||||||
if let Some(x) = relevant.next() {
|
if let Some(x) = relevant.next() {
|
||||||
let url = x.subject.url;
|
let url = x.subject.url;
|
||||||
let Some(url) = url else {
|
let Some(url) = url else {
|
||||||
@ -56,6 +56,11 @@ impl<D: DrawTarget<Color = Rgb565>> Schedule<D> for GithubNotifications {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
lines.push(format!("{} #{}", parts[5], parts[7]));
|
lines.push(format!("{} #{}", parts[5], parts[7]));
|
||||||
|
if lines.len() < 8 {
|
||||||
|
lines.push(format!(" {}", x.subject.title));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let remaining = relevant.count();
|
let remaining = relevant.count();
|
||||||
|
Loading…
Reference in New Issue
Block a user