Skip to content

Commit f895d97

Browse files
committed
feat(snippets): show only non deleted snippets
1 parent 5b12cc7 commit f895d97

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/renderer/store/snippets.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export const useSnippetStore = defineStore('snippets', {
1515
} as State),
1616

1717
getters: {
18+
snippetsNonDeleted: state =>
19+
state.snippets.filter(i => !i.isDeleted) as SnippetWithFolder[],
20+
snippetsDeleted: state =>
21+
state.snippets.filter(i => i.isDeleted) as SnippetWithFolder[],
1822
selectedId: state => state.snippet?.id,
1923
currentContent: state => state.snippet?.content[state.fragment]?.value,
2024
currentLanguage: state =>

0 commit comments

Comments
 (0)