note cache fixes for created notes

This commit is contained in:
zadam
2020-05-13 23:06:13 +02:00
parent 7992f32d34
commit a287bb59ea
4 changed files with 71 additions and 46 deletions

View File

@@ -11,6 +11,7 @@ import Component from "../widgets/component.js";
import keyboardActionsService from "./keyboard_actions.js";
import MobileScreenSwitcherExecutor from "../widgets/mobile_widgets/mobile_screen_switcher.js";
import MainTreeExecutors from "./main_tree_executors.js";
import protectedSessionHolder from "./protected_session_holder.js";
class AppContext extends Component {
constructor(isMainWindow) {
@@ -110,6 +111,8 @@ const appContext = new AppContext(window.glob.isMainWindow);
// we should save all outstanding changes before the page/app is closed
$(window).on('beforeunload', () => {
protectedSessionHolder.resetSessionCookie();
appContext.triggerEvent('beforeUnload');
});