mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Cloning of a note should also clone its attachments -> fixes #1904
This commit is contained in:
@@ -7,6 +7,7 @@ import moment from 'moment'
|
||||
import _ from 'lodash'
|
||||
import ee from 'browser/main/lib/eventEmitter'
|
||||
import dataApi from 'browser/main/lib/dataApi'
|
||||
import attachmentManagement from 'browser/main/lib/dataApi/attachmentManagement'
|
||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||
import NoteItem from 'browser/components/NoteItem'
|
||||
import NoteItemSimple from 'browser/components/NoteItemSimple'
|
||||
@@ -662,6 +663,10 @@ class NoteList extends React.Component {
|
||||
title: firstNote.title + ' ' + i18n.__('copy'),
|
||||
content: firstNote.content
|
||||
})
|
||||
.then((note) => {
|
||||
attachmentManagement.cloneAttachments(storage.key, firstNote, note)
|
||||
return note
|
||||
})
|
||||
.then((note) => {
|
||||
dispatch({
|
||||
type: 'UPDATE_NOTE',
|
||||
|
||||
Reference in New Issue
Block a user