[Bug] On a fresh install with no feeds copy/open link panics
NickLarsenNZ opened this issue · 4 comments
Lines 546 to 547 in abb911c
I could update it to look like the piece a few lines down, like:
if let Some(feed) = self.current_feed.clone() {
feed.link.clone().unwrap_or_else(|| feed.feed_link.unwrap())
} else {
"".to_string()
}
But I think it might be best to instead change the signature to
fn get_current_link(&self) -> Option<String> {
// ...
Then update the pieces of code that call it, do do nothing if it is a None
variant.
Or perhaps add a variant to Selected
to represent when nothing is selected, which is the case on a fresh install.
Lines 2 to 6 in ed7757e
Hey @NickLarsenNZ I'm just commenting to say thank for your opening these issues and the PR! It'll likely be a few days before I can review them, but thanks for your contribution!
Thanks for the detailed writeup and suggested fixes @NickLarsenNZ. I was able to reproduce. Fixed in 81d16b0