You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-20 23:30:05 +02:00
Revert "All: Added support for hierarchical/nested tags (#2572)"
This reverts commit e11e57f1d8.
This commit is contained in:
@@ -4,7 +4,6 @@ const Note = require('lib/models/Note.js');
|
||||
const { Database } = require('lib/database.js');
|
||||
const { _ } = require('lib/locale.js');
|
||||
const BaseItem = require('lib/models/BaseItem.js');
|
||||
const { nestedPath } = require('lib/nested-utils.js');
|
||||
const { substrWithEllipsis } = require('lib/string-utils.js');
|
||||
|
||||
class Folder extends BaseItem {
|
||||
@@ -264,7 +263,22 @@ class Folder extends BaseItem {
|
||||
}
|
||||
|
||||
static folderPath(folders, folderId) {
|
||||
return nestedPath(folders, folderId);
|
||||
const idToFolders = {};
|
||||
for (let i = 0; i < folders.length; i++) {
|
||||
idToFolders[folders[i].id] = folders[i];
|
||||
}
|
||||
|
||||
const path = [];
|
||||
while (folderId) {
|
||||
const folder = idToFolders[folderId];
|
||||
if (!folder) break; // Shouldn't happen
|
||||
path.push(folder);
|
||||
folderId = folder.parent_id;
|
||||
}
|
||||
|
||||
path.reverse();
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
static folderPathString(folders, folderId, maxTotalLength = 80) {
|
||||
|
||||
Reference in New Issue
Block a user