Component and other handler deregisterations

This commit is contained in:
Mo Bitar
2020-03-24 12:12:07 -05:00
parent ee7cb1fce6
commit 7aa38cbdb8
11 changed files with 476 additions and 310 deletions

View File

@@ -67,6 +67,8 @@ class EditorCtrl extends PureCtrl {
this.leftPanelPuppet = null;
this.rightPanelPuppet = null;
this.onEditorLoad = null;
this.unregisterComponent();
this.unregisterComponent = null;
super.deinit();
}
@@ -243,7 +245,7 @@ class EditorCtrl extends PureCtrl {
this.reloadPreferences();
if (note.dummy) {
this.focusEditor();
this.focusTitle();
}
if (previousNote && previousNote !== note) {
if (previousNote.dummy) {
@@ -866,7 +868,7 @@ class EditorCtrl extends PureCtrl {
}
registerComponentHandler() {
this.application.componentManager.registerHandler({
this.unregisterComponent = this.application.componentManager.registerHandler({
identifier: 'editor',
areas: [
'note-tags',