mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
#129, removed recent notes dialog as its not necessary anymore
This commit is contained in:
@@ -1,30 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
const repository = require('../../services/repository');
|
||||
const optionService = require('../../services/options');
|
||||
const RecentNote = require('../../entities/recent_note');
|
||||
const noteCacheService = require('../../services/note_cache');
|
||||
|
||||
async function getRecentNotes() {
|
||||
const recentNotes = await repository.getEntities(`
|
||||
SELECT
|
||||
recent_notes.*
|
||||
FROM
|
||||
recent_notes
|
||||
JOIN branches USING(branchId)
|
||||
WHERE
|
||||
recent_notes.isDeleted = 0
|
||||
AND branches.isDeleted = 0
|
||||
ORDER BY
|
||||
dateCreated DESC
|
||||
LIMIT 200`);
|
||||
|
||||
for (const rn of recentNotes) {
|
||||
rn.title = noteCacheService.getNoteTitleForPath(rn.notePath.split('/'));
|
||||
}
|
||||
|
||||
return recentNotes;
|
||||
}
|
||||
|
||||
async function addRecentNote(req) {
|
||||
const branchId = req.params.branchId;
|
||||
@@ -36,11 +13,8 @@ async function addRecentNote(req) {
|
||||
}).save();
|
||||
|
||||
await optionService.setOption('startNotePath', notePath);
|
||||
|
||||
return await getRecentNotes();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getRecentNotes,
|
||||
addRecentNote
|
||||
};
|
||||
Reference in New Issue
Block a user