From a66f166df08161b407d9c84921a1324d97a9b7b4 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 7 Apr 2019 10:04:17 +0200 Subject: [PATCH] sessions: fix saving to history when opening --- CHANGELOG.md | 2 ++ src/server/callbacks.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25310c62..e907a13d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## next +- bug fixes + - sessions not added to history when opened - widgets - **removed** deprecated widgets `multifader`, `multitoggle`, `multipush` and `formula` - new `JS{{}}` property syntax for javascript lovers diff --git a/src/server/callbacks.js b/src/server/callbacks.js index a4726103..dc5756ba 100644 --- a/src/server/callbacks.js +++ b/src/server/callbacks.js @@ -72,6 +72,10 @@ module.exports = { if (Array.isArray(data.path)) data.path = path.resolve(...data.path) + if (!settings.read('readOnly')) { + module.exports.sessionAddToHistory(data.path) + } + ipc.clients[clientId].sessionPath = data.path ipc.send('setTitle', path.basename(data.path), clientId) @@ -204,10 +208,6 @@ module.exports = { } } - if (!settings.read('readOnly')) { - module.exports.sessionAddToHistory(data.path) - } - module.exports.sessionSetPath({path: data.path}, clientId) })