From 008e30bdb736b8ad07fb98007705b39096b0de86 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 14 Oct 2019 01:47:21 +0200 Subject: [PATCH] Apply linter --- ReactNativeClient/lib/components/screen-header.js | 4 ++-- ReactNativeClient/lib/models/Note.js | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ReactNativeClient/lib/components/screen-header.js b/ReactNativeClient/lib/components/screen-header.js index 9c025c8fd8..6bd5064b19 100644 --- a/ReactNativeClient/lib/components/screen-header.js +++ b/ReactNativeClient/lib/components/screen-header.js @@ -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' }); diff --git a/ReactNativeClient/lib/models/Note.js b/ReactNativeClient/lib/models/Note.js index 64e02aa6c2..8239da4393 100644 --- a/ReactNativeClient/lib/models/Note.js +++ b/ReactNativeClient/lib/models/Note.js @@ -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; }