Skip to content

Commit ec2e831

Browse files
committed
Fixes a bug with the "Exit Note" action
1 parent 4937063 commit ec2e831

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

manifest-beta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "sentinel",
33
"name": "Sentinel",
4-
"version": "1.1.0-beta.1",
4+
"version": "1.1.0-beta.2",
55
"minAppVersion": "1.7.7",
66
"description": "Trigger actions based on document visibility changes.",
77
"author": "Giorgos Sarigiannidis",

src/handlers/leafChangeHandler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export async function handleLeafChange(
1818
if (previousFile instanceof TFile) {
1919
const previousFileInfo = openedFiles.get(lastActiveLeaf.path);
2020

21+
onFileChanged(previousFile, 'everyLeave');
22+
2123
// Detect if the previous file has been modified
2224
if (
2325
previousFileInfo &&
@@ -50,7 +52,6 @@ export async function handleLeafChange(
5052
const filePath = file.path;
5153

5254
if (!isSplitViewActive(app)) {
53-
onFileChanged(file, 'everyLeave');
5455
onFileChanged(file, 'everyOpen');
5556
}
5657

0 commit comments

Comments
 (0)