File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ export default class LinterPlugin extends Plugin {
135135
136136 async saveSettings ( ) {
137137 if ( ! this . hasLoadedMisspellingFiles ) {
138- await this . loadAutoCorrectFiles ( ) ;
138+ await this . loadAutoCorrectFiles ( false ) ;
139139 }
140140
141141 await this . saveData ( this . settings ) ;
@@ -273,7 +273,7 @@ export default class LinterPlugin extends Plugin {
273273
274274 this . app . workspace . onLayoutReady ( async ( ) => {
275275 await this . makeSureSettingsFilledInAndCleanupSettings ( ) ;
276- await this . loadAutoCorrectFiles ( ) ;
276+ await this . loadAutoCorrectFiles ( true ) ;
277277 } ) ;
278278
279279 // Source for save setting
@@ -320,13 +320,17 @@ export default class LinterPlugin extends Plugin {
320320 }
321321 }
322322
323- async loadAutoCorrectFiles ( ) {
323+ async loadAutoCorrectFiles ( isOnload : boolean ) {
324324 const customAutoCorrectSettings = this . settings . ruleConfigs [ 'auto-correct-common-misspellings' ] ;
325325 if ( ! customAutoCorrectSettings || ! customAutoCorrectSettings . enabled ) {
326326 return ;
327327 }
328328
329329 await downloadMisspellings ( this , async ( message : string ) => {
330+ if ( isOnload ) {
331+ message = 'Obsidian Linter:\n' + message ;
332+ }
333+
330334 new Notice ( message ) ;
331335
332336 this . settings . ruleConfigs [ 'auto-correct-common-misspellings' ] . enabled = false ;
You can’t perform that action at this time.
0 commit comments