beta release build 0.5.0

This commit is contained in:
刘浩远 2020-07-01 12:46:04 +08:00
parent c64a4593a6
commit d50f05ac88
2 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "fluent-reader",
"version": "0.4.1",
"version": "0.5.0",
"description": "A simplistic, modern desktop RSS reader",
"main": "./dist/electron.js",
"scripts": {
@ -55,7 +55,13 @@
"target": [
"dmg"
],
"category": "public.app-category.news"
"category": "public.app-category.news",
"electronLanguages": [
"zh_CN",
"en_US",
"fr_FR",
"es"
]
},
"mas": {
"appId": "DevHYLiu.FluentReader",

View File

@ -161,9 +161,10 @@ export function fetchItems(): AppThunk<Promise<void>> {
let promises = new Array<Promise<RSSItem[]>>()
if (!getState().app.fetchingItems) {
let timenow = new Date().getTime()
let sources = <RSSSource[]>Object.values(getState().sources).filter(s =>
((s.lastFetched ? s.lastFetched.getTime() : 0) + (s.fetchFrequency || 0) * 60000) <= timenow
)
let sources = <RSSSource[]>Object.values(getState().sources).filter(s => {
let last = s.lastFetched ? s.lastFetched.getTime() : 0
return (last > timenow) || (last + (s.fetchFrequency || 0) * 60000 <= timenow)
})
for (let source of sources) {
let promise = RSSSource.fetchItems(source)
promise.finally(() => dispatch(fetchItemsIntermediate()))
@ -185,6 +186,8 @@ export function fetchItems(): AppThunk<Promise<void>> {
resolve()
})
.catch(err => {
dispatch(fetchItemsSuccess([], getState().items))
window.utils.showErrorBox("A database error has occurred.", String(err))
console.log(err)
reject(err)
})