Skip to content

Commit 3a51e69

Browse files
committed
perf(snippets): no need to fetch snippets after patch
1 parent 3a91111 commit 3a51e69

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/renderer/store/snippets.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export const useSnippetStore = defineStore('snippets', {
120120
key: keyof SnippetContent,
121121
value: string | Language
122122
) {
123-
const folderStore = useFolderStore()
124123
const body: Partial<Snippet> = {}
125124
const content = this.selected?.content
126125

@@ -130,7 +129,6 @@ export const useSnippetStore = defineStore('snippets', {
130129
body.updatedAt = new Date().valueOf()
131130

132131
await useApi(`/snippets/${this.selectedId}`).patch(body)
133-
await this.getSnippetsByFolderIds(folderStore.selectedIds!)
134132
}
135133
},
136134
async addNewSnippet (body?: Partial<Snippet>) {

0 commit comments

Comments
 (0)