File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,10 @@ declare module "obsidian" {
114114 plugins : {
115115 plugins : {
116116 "obsidian-task-collector" ?: {
117+ api ?: {
118+ getCompletedTaskValues ( ) : string ;
119+ getIncompleteTaskValues ( ) : string ;
120+ } ;
117121 taskCollector ?: {
118122 settings ?: {
119123 supportCanceledTasks : boolean ;
File renamed without changes.
Original file line number Diff line number Diff line change @@ -28,16 +28,22 @@ export class Snippetor {
2828 get taskValues ( ) : Set < string > {
2929 const tcPlugin = this . app . plugins . plugins [ "obsidian-task-collector" ] ;
3030 if ( tcPlugin ) {
31- let values = tcPlugin . taskCollector . settings . incompleteTaskValues ;
32- if ( tcPlugin . taskCollector . settings . supportCanceledTasks ) {
33- values += "-" ;
34- }
35- values += "x" ;
36- if ( ! tcPlugin . taskCollector . settings . onlyLowercaseX ) {
37- values += "X" ;
31+ let values = "" ;
32+ if ( tcPlugin . api ) {
33+ values += tcPlugin . api . getCompletedTaskValues ( ) ;
34+ values += tcPlugin . api . getIncompleteTaskValues ( ) ;
35+ } else {
36+ values += tcPlugin . taskCollector . settings . onlyLowercaseX
37+ ? "x"
38+ : "xX" ;
39+ values += tcPlugin . taskCollector . settings . supportCanceledTasks
40+ ? "-"
41+ : "" ;
42+ values += tcPlugin . taskCollector . settings . incompleteTaskValues ;
3843 }
3944 return new Set ( values . replace ( " " , "" ) . split ( "" ) ) ;
4045 }
46+ // return a few as examples
4147 return new Set ( [ "x" , "-" , ">" ] ) ;
4248 }
4349
You can’t perform that action at this time.
0 commit comments