Skip to content
Prev Previous commit
Next Next commit
feat: get tags during init
  • Loading branch information
antonreshetov committed Apr 7, 2022
commit 8d981faa823b0a129287b1040a2646f3f7d9a0e5
3 changes: 3 additions & 0 deletions src/renderer/views/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
import { store } from '@/electron'
import { useFolderStore } from '@/store/folders'
import { useSnippetStore } from '@/store/snippets'
import { useTagStore } from '@/store/tags'

const folderStore = useFolderStore()
const snippetStore = useSnippetStore()
const tagStore = useTagStore()

const init = async () => {
const storedFolderId = store.app.get('selectedFolderId')
Expand All @@ -21,6 +23,7 @@ const init = async () => {

await folderStore.getFolders()
await snippetStore.getSnippets()
await tagStore.getTags()

if (storedSnippetId) {
snippetStore.setSnippetById(storedSnippetId)
Expand Down