mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
toc fixes
This commit is contained in:
@@ -11,7 +11,9 @@ export default class RightPaneContainer extends FlexContainer {
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return super.isEnabled() && this.children.length > 0 && !!this.children.find(ch => ch.isEnabled());
|
||||
return super.isEnabled()
|
||||
&& this.children.length > 0
|
||||
&& !!this.children.find(ch => ch.isEnabled() && ch.canBeShown());
|
||||
}
|
||||
|
||||
handleEventInChildren(name, data) {
|
||||
@@ -21,13 +23,20 @@ export default class RightPaneContainer extends FlexContainer {
|
||||
// right pane is displayed only if some child widget is active
|
||||
// we'll reevaluate the visibility based on events which are probable to cause visibility change
|
||||
// but these events needs to be finished and only then we check
|
||||
promise.then(() => {
|
||||
this.toggleInt(this.isEnabled());
|
||||
|
||||
splitService.setupRightPaneResizer();
|
||||
});
|
||||
promise.then(() => this.reevaluateIsEnabledCommand());
|
||||
}
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
reevaluateIsEnabledCommand() {
|
||||
const oldToggle = !this.isHiddenInt();
|
||||
const newToggle = this.isEnabled();
|
||||
|
||||
if (oldToggle !== newToggle) {
|
||||
this.toggleInt(newToggle);
|
||||
|
||||
splitService.setupRightPaneResizer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user