diff --git a/package.json b/package.json index 371af27e2..af0553877 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.40.1", + "version": "0.40.2", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/public/javascripts/mobile.js b/src/public/javascripts/mobile.js index 2b645575c..44e5eac44 100644 --- a/src/public/javascripts/mobile.js +++ b/src/public/javascripts/mobile.js @@ -86,6 +86,8 @@ async function showTree() { }); } }); + + treeService.setTree($.ui.fancytree.getTree("#tree")); } $detail.on("click", ".note-menu-button", async e => { diff --git a/src/public/javascripts/widgets/calendar.js b/src/public/javascripts/widgets/calendar.js index 3bd20ed4f..fcc6bb4c0 100644 --- a/src/public/javascripts/widgets/calendar.js +++ b/src/public/javascripts/widgets/calendar.js @@ -43,7 +43,7 @@ class CalendarWidget extends StandardWidget { } init($el, activeDate) { - this.activeDate = new Date(Date.parse(activeDate)); + this.activeDate = new Date(activeDate + "T12:00:00"); // attaching time fixes local timezone handling this.todaysDate = new Date(); this.date = new Date(this.activeDate.getTime()); diff --git a/src/services/build.js b/src/services/build.js index 69ace9222..9a12d75ae 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2020-01-19T15:45:06+01:00", buildRevision: "ab535bf147edac113299f76f410ff88b2c06735b" }; +module.exports = { buildDate:"2020-02-01T10:17:51+01:00", buildRevision: "0f25c8a95f381d99b66735b9c0af3e319edb72ed" }; diff --git a/src/services/cloning.js b/src/services/cloning.js index 0545ea240..ed991214a 100644 --- a/src/services/cloning.js +++ b/src/services/cloning.js @@ -7,6 +7,7 @@ const noteService = require('./notes'); const repository = require('./repository'); const Branch = require('../entities/branch'); const TaskContext = require("./task_context.js"); +const utils = require('./utils'); async function cloneNoteToParent(noteId, parentNoteId, prefix) { if (await isNoteDeleted(noteId) || await isNoteDeleted(parentNoteId)) { @@ -54,7 +55,8 @@ async function ensureNoteIsAbsentFromParent(noteId, parentNoteId) { const branch = await repository.getEntity(`SELECT * FROM branches WHERE noteId = ? AND parentNoteId = ? AND isDeleted = 0`, [noteId, parentNoteId]); if (branch) { - await noteService.deleteBranch(branch, new TaskContext()); + const deleteId = utils.randomString(10); + await noteService.deleteBranch(branch, deleteId, new TaskContext()); } }