mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Remove pinnedNotes from Folder
This commit is contained in:
@@ -44,8 +44,7 @@ function createFolder (storageKey, input) {
|
||||
let newFolder = {
|
||||
key,
|
||||
color: input.color,
|
||||
name: input.name,
|
||||
pinnedNotes: []
|
||||
name: input.name
|
||||
}
|
||||
|
||||
storage.folders.push(newFolder)
|
||||
|
||||
@@ -45,11 +45,6 @@ function updateFolder (storageKey, folderKey, input) {
|
||||
targetFolder.name = input.name
|
||||
targetFolder.color = input.color
|
||||
// For compativility
|
||||
if (targetFolder.pinnedNotes) {
|
||||
targetFolder.pinnedNotes.push(input.pinnedNote)
|
||||
} else {
|
||||
targetFolder.pinnedNotes = [input.pinnedNote]
|
||||
}
|
||||
|
||||
CSON.writeFileSync(path.join(storage.path, 'boostnote.json'), _.pick(storage, ['folders', 'version']))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user