File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -485,6 +485,8 @@ export default class ObsidianGit extends Plugin {
485
485
this . automaticsManager . unload ( ) ;
486
486
this . branchBar ?. remove ( ) ;
487
487
this . statusBar ?. remove ( ) ;
488
+ this . statusBar = undefined ;
489
+ this . branchBar = undefined ;
488
490
this . gitManager . unload ( ) ;
489
491
this . promiseQueue . clear ( ) ;
490
492
@@ -522,7 +524,7 @@ export default class ObsidianGit extends Plugin {
522
524
}
523
525
524
526
async init ( { fromReload = false } ) : Promise < void > {
525
- if ( this . settings . showStatusBar ) {
527
+ if ( this . settings . showStatusBar && ! this . statusBar ) {
526
528
const statusBarEl = this . addStatusBarItem ( ) ;
527
529
this . statusBar = new StatusBar ( statusBarEl , this ) ;
528
530
this . intervalsToClear . push (
@@ -557,7 +559,8 @@ export default class ObsidianGit extends Plugin {
557
559
558
560
if (
559
561
Platform . isDesktop &&
560
- this . settings . showBranchStatusBar
562
+ this . settings . showBranchStatusBar &&
563
+ ! this . branchBar
561
564
) {
562
565
const branchStatusBarEl = this . addStatusBarItem ( ) ;
563
566
this . branchBar = new BranchStatusBar (
You can’t perform that action at this time.
0 commit comments