fix update of window title during note renaming

This commit is contained in:
zadam 2019-06-24 20:12:04 +02:00
parent 504b2e2c4a
commit d49cae9cea
3 changed files with 13 additions and 7 deletions

6
package-lock.json generated
View file

@ -2820,9 +2820,9 @@
"integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q=="
},
"electron": {
"version": "6.0.0-beta.9",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.9.tgz",
"integrity": "sha512-tbBpSamFzD1ayJhF+sUo56e7qD+djdMOPh8B0iA0C10pYbi0HUSEH1EOLtB+UMWU3wkc8QOCMWcgz7wze1w6QQ==",
"version": "6.0.0-beta.10",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.0-beta.10.tgz",
"integrity": "sha512-eKDUv5ZZGjFE2ccBQzBpY6j3oT1NvnHGLcSoGXp6vCWkx+ZYjPyujwG3gW61FK7iL5FMKyg9IlhCOsIy4HEruw==",
"dev": true,
"requires": {
"@types/node": "^10.12.18",

View file

@ -75,7 +75,7 @@
},
"devDependencies": {
"devtron": "1.4.0",
"electron": "6.0.0-beta.9",
"electron": "6.0.0-beta.10",
"electron-builder": "20.44.2",
"electron-compile": "6.4.4",
"electron-installer-debian": "2.0.0",

View file

@ -67,12 +67,18 @@ class TabContext {
this.components = {};
this.$noteTitle.on('input', () => {
if (!this.note) {
return;
}
this.noteChanged();
const title = this.$noteTitle.val();
this.note.title = this.$noteTitle.val();
this.tabRow.updateTab(this.$tab[0], {title});
treeService.setNoteTitle(this.noteId, title);
this.tabRow.updateTab(this.$tab[0], {title: this.note.title});
treeService.setNoteTitle(this.noteId, this.note.title);
this.setTitleBar();
});
if (utils.isDesktop()) {