mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
Add pinn to top
This commit is contained in:
@@ -44,6 +44,12 @@ function updateFolder (storageKey, folderKey, input) {
|
||||
if (targetFolder == null) throw new Error('Target folder doesn\'t exist.')
|
||||
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