-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error indicators to feed list #457
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -428,6 +428,8 @@ export let Database = { | |
dateModified: 0, | ||
lastUpdated: 0, | ||
oldestEntryDate: 0, | ||
lastFetched: 0, | ||
error: false, | ||
}; | ||
console.log('Creating node', newFeed); | ||
this._feeds.push(newFeed); | ||
|
@@ -553,6 +555,11 @@ export let Database = { | |
modified = parseDateValue(parsedFeed.updated); | ||
} | ||
if(!entries.length || (modified && modified <= feed.dateModified)) { | ||
await this.modifyFeed({ | ||
feedID: feed.feedID, | ||
lastFetched: now, | ||
error: false, | ||
}); | ||
return {entries: [], newEntries: []}; | ||
} | ||
let newEntries = await this._pushEntries({feed, entries}); | ||
|
@@ -563,8 +570,10 @@ export let Database = { | |
subtitle: parsedFeed.subtitle ? parsedFeed.subtitle.text : '', | ||
oldestEntryDate: Math.min(entries.map(e => e.date)) || feed.oldestEntryDate, | ||
language: parsedFeed.language, | ||
lastUpdated: Date.now(), | ||
lastUpdated: now, | ||
dateModified: modified, | ||
lastFetched: now, | ||
error: false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be a good idea to also store a timestamp of the last successful fetch as "this feed failed to update last time" and "this feed could not update for two months" are different situations. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
}); | ||
await this.modifyFeed(feedUpdates); | ||
await this.expireEntries(feed); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,10 @@ tree-folder-header > .title { | |
font-weight: bold !important; | ||
} | ||
|
||
tree-item.error > .title { | ||
color: #B23628 !important; | ||
} | ||
|
||
.unread-count { | ||
min-width: 2em !important; | ||
margin-left: auto !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to apply different styles, but none was good enough. So I removed the circle and painted feed titles in red instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can also replace feed icon with https://github.com/brief-rss/brief/blob/master/icons/error.png. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block will likely be modified / removed in the near future as quite some feeds have incorrect dateModified, but for now looks correct.