mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
Stream EPIPEエラー解決、データはこれからJSON保存
This commit is contained in:
@@ -67,7 +67,7 @@ function folders (state = initialFolders, action) {
|
||||
if (conflictFolder != null) throw new Error(`${newFolder.name} already exists!`)
|
||||
state.push(newFolder)
|
||||
|
||||
dataStore.setFolders(null, state)
|
||||
dataStore.setFolders(state)
|
||||
activityRecord.emit('FOLDER_CREATE')
|
||||
return state
|
||||
}
|
||||
@@ -94,7 +94,7 @@ function folders (state = initialFolders, action) {
|
||||
updatedAt: new Date()
|
||||
})
|
||||
|
||||
dataStore.setFolders(null, state)
|
||||
dataStore.setFolders(state)
|
||||
activityRecord.emit('FOLDER_UPDATE')
|
||||
return state
|
||||
}
|
||||
@@ -107,7 +107,7 @@ function folders (state = initialFolders, action) {
|
||||
if (targetIndex >= 0) {
|
||||
state.splice(targetIndex, 1)
|
||||
}
|
||||
dataStore.setFolders(null, state)
|
||||
dataStore.setFolders(state)
|
||||
activityRecord.emit('FOLDER_DESTROY')
|
||||
return state
|
||||
}
|
||||
@@ -167,7 +167,7 @@ function articles (state = initialArticles, action) {
|
||||
if (targetIndex < 0) state.unshift(article)
|
||||
else state.splice(targetIndex, 1, article)
|
||||
|
||||
if (article.status !== 'NEW') dataStore.setArticles(null, state)
|
||||
if (article.status !== 'NEW') dataStore.setArticles(state)
|
||||
else isCreatingNew = true
|
||||
return state
|
||||
}
|
||||
@@ -178,7 +178,7 @@ function articles (state = initialArticles, action) {
|
||||
let targetIndex = _.findIndex(state, _article => articleKey === _article.key)
|
||||
if (targetIndex >= 0) state.splice(targetIndex, 1)
|
||||
|
||||
dataStore.setArticles(null, state)
|
||||
dataStore.setArticles(state)
|
||||
return state
|
||||
}
|
||||
case FOLDER_DESTROY:
|
||||
@@ -187,7 +187,7 @@ function articles (state = initialArticles, action) {
|
||||
|
||||
state = state.filter(article => article.FolderKey !== folderKey)
|
||||
|
||||
dataStore.setArticles(null, state)
|
||||
dataStore.setArticles(state)
|
||||
return state
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user