@@ -384,15 +384,15 @@ export default class ObsidianGit extends Plugin {
384
384
name : "CAUTION: Discard all changes" ,
385
385
callback : async ( ) => {
386
386
if ( ! await this . isAllInitialized ( ) ) return false ;
387
- const modal = new GeneralModal ( {
388
- options : [ "NO" , "YES" ] ,
389
- placeholder : "Do you want to discard all changes to tracked files? This action cannot be undone." ,
390
- onlySelection : true
391
- } ) ;
392
- const shouldDiscardAll = await modal . open ( ) === "YES" ;
393
- if ( shouldDiscardAll ) {
394
- this . promiseQueue . addTask ( ( ) => this . discardAll ( ) ) ;
395
- }
387
+ const modal = new GeneralModal ( {
388
+ options : [ "NO" , "YES" ] ,
389
+ placeholder : "Do you want to discard all changes to tracked files? This action cannot be undone." ,
390
+ onlySelection : true
391
+ } ) ;
392
+ const shouldDiscardAll = await modal . open ( ) === "YES" ;
393
+ if ( shouldDiscardAll ) {
394
+ this . promiseQueue . addTask ( ( ) => this . discardAll ( ) ) ;
395
+ }
396
396
}
397
397
} ) ;
398
398
@@ -585,7 +585,7 @@ export default class ObsidianGit extends Plugin {
585
585
this . displayError ( "Cannot run git command" ) ;
586
586
break ;
587
587
case "missing-repo" :
588
- new Notice ( "Can't find a valid git repository. Please create one via the given command or clone an existing repo." ) ;
588
+ new Notice ( "Can't find a valid git repository. Please create one via the given command or clone an existing repo." , 10000 ) ;
589
589
break ;
590
590
case "valid" :
591
591
this . gitReady = true ;
@@ -1088,7 +1088,7 @@ export default class ObsidianGit extends Plugin {
1088
1088
async discardAll ( ) {
1089
1089
await this . gitManager . discardAll ( {
1090
1090
status : this . cachedStatus
1091
- } )
1091
+ } ) ;
1092
1092
new Notice ( 'All local changes have been discarded. New files remain untouched.' ) ;
1093
1093
}
1094
1094
0 commit comments