Skip to content

Commit

Permalink
Fall back on updated time if published_at not available (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
juansc authored Apr 2, 2024
1 parent 8227a11 commit 067aebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src-tauri/src/syndication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn fetch_feed_items(link: &str, proxy: Option<&str>) -> Result<Vec<RawItem>>
.map(atom_syndication::Content::value)
.filter(std::option::Option::is_some)
.map(|x| x.unwrap().to_string()),
published_at: x.published().map(|x| x.with_timezone(&Utc).fixed_offset()),
published_at: x.published().or(Some(x.updated())).map(|x| x.with_timezone(&Utc).fixed_offset()),
})
.collect()),
Feed::RSS(rss) => Ok(rss
Expand Down

0 comments on commit 067aebd

Please sign in to comment.