mirror of
https://github.com/BoostIo/Boostnote
synced 2026-01-07 22:19:23 +00:00
fix minor bugs
fix codemirror bug fix style bug of in NoteList fix Redux store bug: Cruch on deleting empty folder
This commit is contained in:
@@ -74,13 +74,10 @@
|
||||
background-color alpha($ui-active-color, 100%)
|
||||
color white
|
||||
.item-title
|
||||
color white
|
||||
.item-title-empty
|
||||
.item-title-icon
|
||||
color white
|
||||
.item-bottom-tagIcon
|
||||
color white
|
||||
.item-bottom-tagList-empty
|
||||
color white
|
||||
.item-bottom-time
|
||||
color white
|
||||
.item-bottom-tagList-item
|
||||
|
||||
@@ -330,31 +330,34 @@ function data (state = defaultDataMap(), action) {
|
||||
let storageNoteSet = state.storageNoteMap.get(action.storage.key)
|
||||
storageNoteSet = new Set(storageNoteSet)
|
||||
state.storageNoteMap.set(action.storage.key, storageNoteSet)
|
||||
noteSet.forEach(function handleNoteKey (noteKey) {
|
||||
// Get note from noteMap
|
||||
let note = state.noteMap.get(noteKey)
|
||||
if (note != null) {
|
||||
state.noteMap.delete(noteKey)
|
||||
|
||||
// From storageSet
|
||||
storageNoteSet.delete(noteKey)
|
||||
if (noteSet != null) {
|
||||
noteSet.forEach(function handleNoteKey (noteKey) {
|
||||
// Get note from noteMap
|
||||
let note = state.noteMap.get(noteKey)
|
||||
if (note != null) {
|
||||
state.noteMap.delete(noteKey)
|
||||
|
||||
// From starredSet
|
||||
if (note.isStarred) {
|
||||
state.starredSet = new Set(state.starredSet)
|
||||
state.starredSet.delete(noteKey)
|
||||
// From storageSet
|
||||
storageNoteSet.delete(noteKey)
|
||||
|
||||
// From starredSet
|
||||
if (note.isStarred) {
|
||||
state.starredSet = new Set(state.starredSet)
|
||||
state.starredSet.delete(noteKey)
|
||||
}
|
||||
|
||||
// Delete key from tag map
|
||||
state.tagNoteMap = new Map(state.tagNoteMap)
|
||||
note.tags.forEach((tag) => {
|
||||
let tagNoteSet = state.tagNoteMap.get(tag)
|
||||
tagNoteSet = new Set(tagNoteSet)
|
||||
state.tagNoteMap.set(tag, tagNoteSet)
|
||||
tagNoteSet.delete(noteKey)
|
||||
})
|
||||
}
|
||||
|
||||
// Delete key from tag map
|
||||
state.tagNoteMap = new Map(state.tagNoteMap)
|
||||
note.tags.forEach((tag) => {
|
||||
let tagNoteSet = state.tagNoteMap.get(tag)
|
||||
tagNoteSet = new Set(tagNoteSet)
|
||||
state.tagNoteMap.set(tag, tagNoteSet)
|
||||
tagNoteSet.delete(noteKey)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
return state
|
||||
case 'ADD_STORAGE':
|
||||
|
||||
Reference in New Issue
Block a user