mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-17 11:41:44 +00:00
remove deuplicate code
This commit is contained in:
@@ -329,7 +329,7 @@ function data (state = defaultDataMap(), action) {
|
|||||||
state.storageNoteMap = new Map(state.storageNoteMap)
|
state.storageNoteMap = new Map(state.storageNoteMap)
|
||||||
let storageNoteSet = state.storageNoteMap.get(action.storage.key)
|
let storageNoteSet = state.storageNoteMap.get(action.storage.key)
|
||||||
storageNoteSet = new Set(storageNoteSet)
|
storageNoteSet = new Set(storageNoteSet)
|
||||||
storageNoteSet.delete()
|
state.storageNoteMap.set(action.storage.key, storageNoteSet)
|
||||||
noteSet.forEach(function handleNoteKey (noteKey) {
|
noteSet.forEach(function handleNoteKey (noteKey) {
|
||||||
// Get note from noteMap
|
// Get note from noteMap
|
||||||
let note = state.noteMap.get(noteKey)
|
let note = state.noteMap.get(noteKey)
|
||||||
@@ -337,9 +337,6 @@ function data (state = defaultDataMap(), action) {
|
|||||||
state.noteMap.delete(noteKey)
|
state.noteMap.delete(noteKey)
|
||||||
|
|
||||||
// From storageSet
|
// From storageSet
|
||||||
let storageNoteSet = state.storageNoteMap.get(note.storage)
|
|
||||||
storageNoteSet = new Set(storageNoteSet)
|
|
||||||
state.storageNoteMap.set(note.storage, storageNoteSet)
|
|
||||||
storageNoteSet.delete(noteKey)
|
storageNoteSet.delete(noteKey)
|
||||||
|
|
||||||
// From starredSet
|
// From starredSet
|
||||||
|
|||||||
Reference in New Issue
Block a user