mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
Merge branch 'master' into next61
# Conflicts: # src/public/app/widgets/note_tree.js
This commit is contained in:
commit
1f3b6feaff
@ -980,22 +980,20 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
this.activityDetected();
|
this.activityDetected();
|
||||||
|
|
||||||
const oldActiveNode = this.getActiveNode();
|
const oldActiveNode = this.getActiveNode();
|
||||||
let oldActiveNodeFocused = false;
|
|
||||||
|
|
||||||
if (oldActiveNode) {
|
const newActiveNode = this.noteContext?.notePath
|
||||||
oldActiveNodeFocused = oldActiveNode.hasFocus();
|
&& (!treeService.isNotePathInHiddenSubtree(this.noteContext.notePath) || await hoistedNoteService.isHoistedInHiddenSubtree())
|
||||||
|
&& await this.getNodeFromPath(this.noteContext.notePath);
|
||||||
|
|
||||||
oldActiveNode.setActive(false);
|
if (newActiveNode !== oldActiveNode) {
|
||||||
oldActiveNode.setFocus(false);
|
let oldActiveNodeFocused = false;
|
||||||
}
|
|
||||||
|
|
||||||
if (this.noteContext?.notePath
|
if (oldActiveNode) {
|
||||||
&& (
|
oldActiveNodeFocused = oldActiveNode.hasFocus();
|
||||||
!treeService.isNotePathInHiddenSubtree(this.noteContext.notePath)
|
|
||||||
|| await hoistedNoteService.isHoistedInHiddenSubtree()
|
oldActiveNode.setActive(false);
|
||||||
)
|
oldActiveNode.setFocus(false);
|
||||||
) {
|
}
|
||||||
const newActiveNode = await this.getNodeFromPath(this.noteContext.notePath);
|
|
||||||
|
|
||||||
if (newActiveNode) {
|
if (newActiveNode) {
|
||||||
if (!newActiveNode.isVisible()) {
|
if (!newActiveNode.isVisible()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user