This repository was archived by the owner on May 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ export const getClickHandler = (plugin: ALxFolderNote) => {
4848 createNew || evt . type === "auxclick" ,
4949 { active : true } ,
5050 ) ;
51+ if ( plugin . settings . expandFolderOnClick && item . collapsed )
52+ await item . setCollapsed ( false ) ;
5153 return true ;
5254 } catch ( error ) {
5355 console . error ( error ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export interface ALxFolderNoteSettings {
2323 folderNoteTemplate : string | null ;
2424 mobileClickToOpen : boolean ;
2525 longPressDelay : number ;
26+ expandFolderOnClick : boolean ;
2627}
2728
2829export const DEFAULT_SETTINGS : ALxFolderNoteSettings = {
@@ -38,6 +39,7 @@ export const DEFAULT_SETTINGS: ALxFolderNoteSettings = {
3839 folderNoteTemplate : null ,
3940 mobileClickToOpen : true ,
4041 longPressDelay : 800 ,
42+ expandFolderOnClick : false ,
4143} ;
4244
4345type SettingKeyWithType < T > = {
@@ -118,6 +120,11 @@ export class ALxFolderNoteSettingTab extends PluginSettingTab {
118120 this . setFolderIcon ( ) ;
119121 this . setModifier ( ) ;
120122 this . setHide ( ) ;
123+ this . addToggle ( this . containerEl , "expandFolderOnClick" )
124+ . setName ( "Expand Folder on Click" )
125+ . setDesc (
126+ "Expand collapsed folders with note while opening them by clicking on folder title" ,
127+ ) ;
121128 this . setMobile ( ) ;
122129 this . setFocus ( ) ;
123130
You can’t perform that action at this time.
0 commit comments