-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to show/hide contents of subfolders #607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me!
src/components/pages/NotePage.tsx
Outdated
!note!.trashed | ||
) { | ||
notes.push(note) | ||
if (preferences['general.showSubfolderContent']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add preferences['general.showSubfolderContent']
to deps of memo hook
src/components/pages/NotePage.tsx
Outdated
} | ||
} else { | ||
if ( | ||
(note!.folderPathname + '/') === (folder.pathname + '/') && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to append /
when comparing
src/lib/preferences.ts
Outdated
@@ -40,6 +40,7 @@ export interface Preferences { | |||
'general.noteListView': GeneralNoteListViewOptions | |||
'general.enableAnalytics': boolean | |||
'general.enableAutoSync': boolean | |||
'general.showSubfolderContent': boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be plural. showSubfolderContents
Thank you so much! |
I don't know if the wording on the front end of it describes very well what the option does. I didn't want to make it too long. Criticism is very welcome.
Fixes #419