small changes for better debugging infos

This commit is contained in:
zadam
2021-02-20 23:17:29 +01:00
parent 081b8b126a
commit fbbd51d0b1
5 changed files with 38 additions and 27 deletions

View File

@@ -91,7 +91,7 @@ export default class Component {
console.log(`Call to ${fun.name} in ${this.componentId} took ${took}ms`);
}
await promise;
await utils.timeLimit(promise, 25000, `Time limit failed on ${this.constructor.name} with ${fun.name}`);
return true;
}

View File

@@ -1126,6 +1126,10 @@ export default class NoteTreeWidget extends TabAwareWidget {
node = await this.expandToNote(nextNotePath, false);
if (node) {
// FIXME: this is conceptually wrong
// here note tree is responsible for updating global state of the application
// this should be done by tabcontext / tabmanager and note tree should only listen to
// changes in active note and just set the "active" state
await appContext.tabManager.getActiveTabContext().setNote(nextNotePath);
}
}