You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Electron: Handle drag and dropping notebooks to change the parent
This commit is contained in:
@@ -107,7 +107,7 @@ class NotesScreenComponent extends BaseScreenComponent {
|
||||
}
|
||||
|
||||
deleteFolder_onPress(folderId) {
|
||||
dialogs.confirm(this, _('Delete notebook? All notes within this notebook will also be deleted.')).then((ok) => {
|
||||
dialogs.confirm(this, _('Delete notebook? All notes and sub-notebooks within this notebook will also be deleted.')).then((ok) => {
|
||||
if (!ok) return;
|
||||
|
||||
Folder.delete(folderId).then(() => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const ArrayUtils = require('lib/ArrayUtils');
|
||||
const Folder = require('lib/models/Folder');
|
||||
|
||||
let shared = {};
|
||||
|
||||
@@ -14,7 +15,7 @@ function renderFoldersRecursive_(props, renderItem, items, parentId, depth) {
|
||||
const folders = props.folders;
|
||||
for (let i = 0; i < folders.length; i++) {
|
||||
let folder = folders[i];
|
||||
if (folder.parent_id !== parentId) continue;
|
||||
if (!Folder.idsEqual(folder.parent_id, parentId)) continue;
|
||||
const hasChildren = folderHasChildren_(folders, folder.id);
|
||||
items.push(renderItem(folder, props.selectedFolderId == folder.id && props.notesParentType == 'Folder', hasChildren, depth));
|
||||
if (hasChildren) items = renderFoldersRecursive_(props, renderItem, items, folder.id, depth + 1);
|
||||
|
||||
Reference in New Issue
Block a user