mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Apply linter
This commit is contained in:
parent
a5f17fad58
commit
008e30bdb7
@ -166,8 +166,8 @@ class ScreenHeaderComponent extends React.PureComponent {
|
||||
async duplicateButton_press() {
|
||||
const noteIds = this.props.selectedNoteIds;
|
||||
|
||||
//Duplicate all selected notes. ensureUniqueTitle is set to true to use the
|
||||
//original note's name as a root for the new unique identifier.
|
||||
// Duplicate all selected notes. ensureUniqueTitle is set to true to use the
|
||||
// original note's name as a root for the new unique identifier.
|
||||
await Note.duplicateMultipleNotes(noteIds, {ensureUniqueTitle: true});
|
||||
|
||||
this.props.dispatch({ type: 'NOTE_SELECTION_END' });
|
||||
|
@ -481,17 +481,15 @@ class Note extends BaseItem {
|
||||
return note;
|
||||
}
|
||||
|
||||
static async duplicateMultipleNotes(noteIds, options = null){
|
||||
/*
|
||||
if options.uniqueTitle is true, a unique title for the duplicated file will be assigned.
|
||||
*/
|
||||
static async duplicateMultipleNotes(noteIds, options = null) {
|
||||
// if options.uniqueTitle is true, a unique title for the duplicated file will be assigned.
|
||||
const ensureUniqueTitle = options && options.ensureUniqueTitle;
|
||||
|
||||
for(const noteId of noteIds){
|
||||
for (const noteId of noteIds) {
|
||||
const noteOptions = {};
|
||||
|
||||
//If ensureUniqueTitle is truthy, set the original note's name as root for the unique title.
|
||||
if(ensureUniqueTitle){
|
||||
// If ensureUniqueTitle is truthy, set the original note's name as root for the unique title.
|
||||
if (ensureUniqueTitle) {
|
||||
const originalNote = await Note.load(noteId);
|
||||
noteOptions.uniqueTitle = originalNote.title;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user