Skip to content

Commit ab799d5

Browse files
committed
fix(snippets): sort in 'All snippets'
1 parent 14e8446 commit ab799d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/renderer/store/snippets.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ export const useSnippetStore = defineStore('snippets', {
7676
if (folder) i.folder = folder
7777
return i
7878
})
79+
80+
this.all.sort((a, b) => (a.createdAt > b.createdAt ? -1 : 1))
7981
},
8082
async getSnippetsByFolderIds (ids: string[]) {
8183
const snippets: SnippetWithFolder[] = []

0 commit comments

Comments
 (0)