api: fix unread detection broken by substring match
The check `.contains("user/-/state/com.google/read")` was a substring
match, which also matched "user/-/state/com.google/reading-list" — a
category present on every article fetched from the reading list. This
caused all articles to be treated as read, so nothing ever appeared
bold in the sidebar.
Fix by using == for exact string comparison.
This commit is contained in:
parent
9a4bf4b9f8
commit
2c5217e744
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ impl Api {
|
|||
Ok(stream.items.into_iter().map(|item| {
|
||||
let unread = !item.categories.as_deref().unwrap_or_default()
|
||||
.iter()
|
||||
.any(|c| c.contains("user/-/state/com.google/read"));
|
||||
.any(|c| c == "user/-/state/com.google/read");
|
||||
let content = item.summary
|
||||
.as_ref()
|
||||
.and_then(|s| s.content.clone())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue