mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
#129, removed recent notes dialog as its not necessary anymore
This commit is contained in:
@@ -8,7 +8,6 @@ import treeChangesService from './branches.js';
|
||||
import treeUtils from './tree_utils.js';
|
||||
import utils from './utils.js';
|
||||
import server from './server.js';
|
||||
import recentNotesDialog from '../dialogs/recent_notes.js';
|
||||
import treeCache from './tree_cache.js';
|
||||
import infoService from "./info.js";
|
||||
import treeBuilder from "./tree_builder.js";
|
||||
@@ -239,6 +238,15 @@ async function setExpandedToServer(branchId, isExpanded) {
|
||||
await server.put('branches/' + branchId + '/expanded/' + expandedNum);
|
||||
}
|
||||
|
||||
function addRecentNote(branchId, notePath) {
|
||||
setTimeout(async () => {
|
||||
// we include the note into recent list only if the user stayed on the note at least 5 seconds
|
||||
if (notePath && notePath === getCurrentNotePath()) {
|
||||
await server.put('recent-notes/' + branchId + '/' + encodeURIComponent(notePath));
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
function setCurrentNotePathToHash(node) {
|
||||
utils.assertArguments(node);
|
||||
|
||||
@@ -247,7 +255,7 @@ function setCurrentNotePathToHash(node) {
|
||||
|
||||
document.location.hash = currentNotePath;
|
||||
|
||||
recentNotesDialog.addRecentNote(currentBranchId, currentNotePath);
|
||||
addRecentNote(currentBranchId, currentNotePath);
|
||||
}
|
||||
|
||||
function getSelectedNodes(stopOnParents = false) {
|
||||
|
||||
Reference in New Issue
Block a user