diff --git a/data/ui/article_row.blp b/data/ui/article_row.blp
index 07c4cbe..ea4c08d 100644
--- a/data/ui/article_row.blp
+++ b/data/ui/article_row.blp
@@ -32,7 +32,6 @@ template $ArticleRow : Gtk.Box {
wrap: true;
lines: 2;
ellipsize: end;
- styles ["article-title"]
}
Label excerpt_label {
diff --git a/data/ui/article_row.ui b/data/ui/article_row.ui
index d5eeab9..e159ff1 100644
--- a/data/ui/article_row.ui
+++ b/data/ui/article_row.ui
@@ -46,9 +46,6 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
true
2
3
-
diff --git a/src/api.rs b/src/api.rs
index c3db913..d683e8f 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -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 == "user/-/state/com.google/read");
+ .any(|c| c.contains("user/-/state/com.google/read"));
let content = item.summary
.as_ref()
.and_then(|s| s.content.clone())
@@ -249,20 +249,9 @@ fn plain_text_excerpt(html: &str, max_chars: usize) -> String {
}
}
let collapsed: String = out.split_whitespace().collect::>().join(" ");
- let decoded = decode_html_entities(&collapsed);
- if decoded.chars().count() <= max_chars {
- decoded
+ if collapsed.chars().count() <= max_chars {
+ collapsed
} else {
- decoded.chars().take(max_chars).collect::() + "…"
+ collapsed.chars().take(max_chars).collect::() + "…"
}
}
-
-fn decode_html_entities(s: &str) -> String {
- s.replace("&", "&")
- .replace("<", "<")
- .replace(">", ">")
- .replace(""", "\"")
- .replace("'", "'")
- .replace("'", "'")
- .replace(" ", " ")
-}
diff --git a/src/app.rs b/src/app.rs
index 8e966e9..6e287f0 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -71,8 +71,8 @@ mod imp {
.sidebar-content row:selected {
background-color: alpha(@window_fg_color, 0.22);
}
- .article-title {
- font-size: 1.05em;
+ .unread-title {
+ font-weight: bold;
}"
);
gtk4::style_context_add_provider_for_display(
diff --git a/src/article_row.rs b/src/article_row.rs
index bb239b2..d8877ce 100644
--- a/src/article_row.rs
+++ b/src/article_row.rs
@@ -44,7 +44,6 @@ mod imp {
pub bindings: RefCell>,
pub unread_handler: RefCell