()
| 997 | |
| 998 | // 更新标题显示未保存状态 |
| 999 | updateTitle() { |
| 1000 | if (!this.file) return; |
| 1001 | |
| 1002 | // 只在状态改变时更新 DOM |
| 1003 | const titleEl = this.containerEl.querySelector('.view-header-title'); |
| 1004 | if (titleEl) { |
| 1005 | const title = this.isDirty ? `${this.file.name} ●` : this.file.name; |
| 1006 | // 只在标题真的改变时才更新 DOM |
| 1007 | if (titleEl.textContent !== title) { |
| 1008 | titleEl.textContent = title; |
| 1009 | } |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | async onLoadFile(file: TFile): Promise<void> { |
| 1014 | await super.onLoadFile(file); |
no outgoing calls
no test coverage detected