File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ export default class clusterPlugin extends Plugin {
1010 console . log ( "loading Cluster plugin" ) ;
1111
1212 await this . loadSettings ( ) ;
13-
1413 this . addSettingTab ( new settingTab ( this . app , this ) ) ;
1514
1615 // UN-SORTED Folder Styling
@@ -19,8 +18,7 @@ export default class clusterPlugin extends Plugin {
1918 await P . unSortedObserver ( this . app ) ;
2019 } , 1000 ) ;
2120
22- await P . cardStyleFunction ( this . settings ) ; //card style for lorens theme
23-
21+
2422 const file = this . app . workspace . getActiveFile ( ) as TFile ;
2523 if ( file ) {
2624 await P . buttonsLine ( this . app , file , this . settings ) ;
@@ -29,6 +27,8 @@ export default class clusterPlugin extends Plugin {
2927 P . addRibbonIcon ( this ) ;
3028 P . fileMenu ( this , P . SimpleFocus ) ;
3129 P . addCommands ( this ) ;
30+
31+ await P . cardStyleFunction ( this . settings ) ; //card style for lorens theme
3232 }
3333
3434 async loadSettings ( ) {
Original file line number Diff line number Diff line change 11import { Plugin , TFile } from "obsidian" ;
2+ import { clusterPluginSettings } from "src/settings/settings" ;
23import P from "src/util/P" ;
34
4- export function addEvents ( plugin : Plugin ) {
5+ interface ExtendedPlugin extends Plugin {
6+ settings : clusterPluginSettings ;
7+ }
8+ export function addEvents ( plugin : ExtendedPlugin ) {
59 // watch if file opened
610 plugin . registerEvent (
7- this . app . workspace . on ( "file-open" , async ( file : TFile ) => {
11+ plugin . app . workspace . on ( "file-open" , async ( file : TFile ) => {
812 if ( file ) {
9- await P . buttonsLine ( this . app , file , this . settings ) ; // Add Cluster Buttons
10- await P . coloringTreePanel ( this . app , file ) ;
11- this . settings . foldProperties ? await P . foldPropertiesElement ( this . app , file ) : null ; // Fold Properties
12- await P . addUnsortedFilesCounter ( this . app ) ;
13- await P . unSortedObserver ( this . app ) ;
13+ await P . buttonsLine ( plugin . app , file , plugin . settings ) ; // Add Cluster Buttons
14+ await P . coloringTreePanel ( plugin . app , file ) ;
15+ plugin . settings . foldProperties ? await P . foldPropertiesElement ( plugin . app , file ) : null ; // Fold Properties
16+ await P . addUnsortedFilesCounter ( plugin . app ) ;
17+ await P . unSortedObserver ( plugin . app ) ;
1418 }
1519 } ) ,
1620 ) ;
You can’t perform that action at this time.
0 commit comments