ba3f6ec ←bd6d568antonApr 14, 2026 api

edit main.ts via macOS

M /sublimated/undefined +15 -0
123 unmodified lines
124 space: this.lastMetadata.space ?? null,
125 };
126 }
127
128 private refreshAfterModify(attempt = 0): void {
129 if (this.modifyRetryTimer) clearTimeout(this.modifyRetryTimer);
130 const delays = [200, 800, 2000];
131 if (attempt >= delays.length) return;
132
133 this.modifyRetryTimer = setTimeout(async () => {
134 const prev = this.lastMetadata?.version ?? null;
135 await this.refreshMetadata();
136 if (this.lastMetadata?.version === prev) {
137 // xattrs haven't updated yet, retry
138 this.refreshAfterModify(attempt + 1);
139 }
140 }, delays[attempt]);
141 }
142
143 private async refreshMetadata(): Promise<void> {
144 const file = this.app.workspace.getActiveFile();
145 if (!file) {
146 this.lastMetadata = null;
161 unmodified lines